mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 10:37:06 +00:00
[9776] Set m_mover to NULL on remove SPELL_AURA_MOD_POSSESS by delete.
This should fix a related crash. Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
7532061a79
commit
1ef89c7a22
3 changed files with 17 additions and 11 deletions
|
|
@ -3631,10 +3631,22 @@ void Aura::HandleModPossess(bool apply, bool Real)
|
|||
}
|
||||
else
|
||||
{
|
||||
p_caster->InterruptSpell(CURRENT_CHANNELED_SPELL); // the spell is not automatically canceled when interrupted, do it now
|
||||
p_caster->SetCharm(NULL);
|
||||
|
||||
p_caster->SetFarSightGUID(0);
|
||||
p_caster->SetClientControl(m_target, 0);
|
||||
p_caster->SetMover(NULL);
|
||||
|
||||
p_caster->RemovePetActionBar();
|
||||
|
||||
// on delete only do caster related effects
|
||||
if(m_removeMode == AURA_REMOVE_BY_DELETE)
|
||||
return;
|
||||
|
||||
m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED);
|
||||
|
||||
m_target->SetCharmerGUID(0);
|
||||
p_caster->InterruptSpell(CURRENT_CHANNELED_SPELL); // the spell is not automatically canceled when interrupted, do it now
|
||||
|
||||
if(m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
|
@ -3647,14 +3659,6 @@ void Aura::HandleModPossess(bool apply, bool Real)
|
|||
m_target->setFaction(cinfo->faction_A);
|
||||
}
|
||||
|
||||
p_caster->SetCharm(NULL);
|
||||
|
||||
p_caster->SetFarSightGUID(0);
|
||||
p_caster->SetClientControl(m_target, 0);
|
||||
p_caster->SetMover(NULL);
|
||||
|
||||
p_caster->RemovePetActionBar();
|
||||
|
||||
if(m_target->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
((Creature*)m_target)->AIM_Initialize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue