fix(Core/Unit): remove wrong CombatStop() when charming (#8733)
This commit is contained in:
@@ -9759,7 +9759,7 @@ bool Unit::AttackStop()
|
|||||||
m_attacking = nullptr;
|
m_attacking = nullptr;
|
||||||
|
|
||||||
// Clear our target
|
// Clear our target
|
||||||
SetTarget();
|
SetTarget(ObjectGuid::Empty);
|
||||||
|
|
||||||
ClearUnitState(UNIT_STATE_MELEE_ATTACKING);
|
ClearUnitState(UNIT_STATE_MELEE_ATTACKING);
|
||||||
|
|
||||||
@@ -17588,17 +17588,6 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
|
|||||||
else if (GetTypeId() == TYPEID_PLAYER)
|
else if (GetTypeId() == TYPEID_PLAYER)
|
||||||
RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
|
RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
|
||||||
|
|
||||||
_charmThreatInfo.clear();
|
|
||||||
|
|
||||||
// Xinef: move invalid threat / hostile references to offline lists
|
|
||||||
ThreatContainer::StorageType threatList = getThreatMgr().getThreatList();
|
|
||||||
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
|
||||||
if (Unit* target = (*itr)->getTarget())
|
|
||||||
_charmThreatInfo[target->GetGUID()] = (*itr)->getThreat() - (*itr)->getTempThreatModifier();
|
|
||||||
|
|
||||||
CombatStop();
|
|
||||||
DeleteThreatList();
|
|
||||||
|
|
||||||
if (Creature* creature = ToCreature())
|
if (Creature* creature = ToCreature())
|
||||||
creature->RefreshSwimmingFlag();
|
creature->RefreshSwimmingFlag();
|
||||||
|
|
||||||
@@ -17640,10 +17629,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
|
|||||||
RestoreFaction();
|
RestoreFaction();
|
||||||
|
|
||||||
CastStop();
|
CastStop();
|
||||||
|
AttackStop();
|
||||||
CombatStop();
|
|
||||||
getHostileRefMgr().deleteReferences();
|
|
||||||
DeleteThreatList();
|
|
||||||
|
|
||||||
// xinef: update speed after charming
|
// xinef: update speed after charming
|
||||||
UpdateSpeed(MOVE_RUN, false);
|
UpdateSpeed(MOVE_RUN, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user