[9644] Changes in emotes work.

Waypoint/db script/event ai/'.npc playemote' emote data now auto select by emote id way to execute:
oneshot or persistent state

So if in referenced DB data wrongly used state emote as oneshot case this will work in different way now.
This commit is contained in:
VladimirMangos 2010-03-30 22:06:20 +04:00
parent bf1903345b
commit 5c7f6356d6
9 changed files with 35 additions and 8 deletions

View file

@ -1744,6 +1744,24 @@ void Unit::HandleEmoteCommand(uint32 anim_id)
SendMessageToSet(&data, true);
}
void Unit::HandleEmoteState(uint32 anim_id)
{
SetUInt32Value(UNIT_NPC_EMOTESTATE, anim_id);
}
void Unit::HandleEmote(uint32 anim_id)
{
if (!anim_id)
HandleEmoteState(0);
else if (EmotesEntry const* emoteEntry = sEmotesStore.LookupEntry(anim_id))
{
if (emoteEntry->EmoteType) // 1,2 states, 0 command
HandleEmoteState(anim_id);
else
HandleEmoteCommand(anim_id);
}
}
uint32 Unit::CalcNotIgnoreAbsorbDamage( uint32 damage, SpellSchoolMask damageSchoolMask, SpellEntry const* spellInfo /*= NULL*/)
{
float absorb_affected_rate = 1.0f;