fix(Core/Units): clear emote state on attack rather than on combat st… (#8170)

- Closes #6281
This commit is contained in:
UltraNix
2021-10-14 16:18:51 +02:00
committed by GitHub
parent 13db23200f
commit cb71cc0131
2 changed files with 7 additions and 8 deletions

View File

@@ -9725,6 +9725,8 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
creature->SendAIReaction(AI_REACTION_HOSTILE);
creature->CallAssistance();
creature->SetAssistanceTimer(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_PERIOD));
SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
}
// delay offhand weapon attack to next attack time
@@ -12816,7 +12818,6 @@ void Unit::CombatStart(Unit* victim, bool initialAggro)
SetInCombatWith(victim);
victim->SetInCombatWith(this);
victim->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
// Xinef: If pet started combat - put owner in combat
if (Unit* owner = GetOwner())