mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
fix(Core/Units): clear emote state on attack rather than on combat st… (#8170)
- Closes #6281
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -1517,17 +1517,15 @@ public:
|
||||
{
|
||||
float angle = me->GetAngle(p);
|
||||
|
||||
if (Unit* vehicle = me->GetVehicleBase())
|
||||
{
|
||||
vehicle->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_CUSTOM_SPELL_01);
|
||||
vehicle->HandleEmoteCommand(EMOTE_STATE_CUSTOM_SPELL_01);
|
||||
angle -= vehicle->GetOrientation();
|
||||
}
|
||||
|
||||
spinningUpOrientation = (uint32)((angle * 100.0f) / (2 * M_PI));
|
||||
spinningUpTimer = 1500;
|
||||
me->SetFacingTo(angle);
|
||||
me->CastSpell(p, SPELL_SPINNING_UP, true);
|
||||
if (Unit* vehicle = me->GetVehicleBase())
|
||||
{
|
||||
vehicle->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_CUSTOM_SPELL_01);
|
||||
vehicle->HandleEmoteCommand(EMOTE_STATE_CUSTOM_SPELL_01);
|
||||
}
|
||||
events.RescheduleEvent((Phase == 2 ? EVENT_SPELL_RAPID_BURST : EVENT_HAND_PULSE), 14500);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user