Cleaned up the emotes code.

This commit is contained in:
Filip Maj 2017-06-15 00:19:18 -04:00
parent 0e8de966a9
commit 1d9f57a385
3 changed files with 14 additions and 11 deletions

View file

@ -63,12 +63,16 @@ emoteTable = {
};
function onEventStarted(player, actor, triggerName, emoteId)
function onEventStarted(player, actor, triggerName, emoteId, unknownArg1, arg2, arg3, targetId)
if (targetId == nil) then
targetId = 0;
end
if (player:GetState() == 0) then
emote = emoteTable[emoteId];
if (emote ~= nil) then
player:doEmote(emote.animId, emote.descId);
player:doEmote(targetId, emote.animId, emote.descId);
else
player:SendMessage(0x20, "", string.format("Not implemented; EmoteId: %d", emoteId));
end
@ -77,6 +81,3 @@ function onEventStarted(player, actor, triggerName, emoteId)
player:EndEvent();
end
function onEventUpdate(player, npc)
end