mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[10076] Fixed crash at remove from world pet under SPELL_AURA_MOD_POSSESS_PET
* Prevent crash at camera list update at attempt increment end() iterator. * Properly do unapply SPELL_AURA_MOD_POSSESS_PET (GetPet() can return NULL at call, and not need checked) * Propertly call unapply at delete auras cases for auras that set player-caster mover pointer.
This commit is contained in:
parent
81851074ad
commit
3e210228f9
4 changed files with 50 additions and 21 deletions
|
|
@ -4511,7 +4511,20 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
|
|||
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "Aura %u now is remove mode %d",Aur->GetModifier()->m_auraname, mode);
|
||||
|
||||
// some auras also need to apply modifier (on caster) on remove
|
||||
if (mode != AURA_REMOVE_BY_DELETE || Aur->GetModifier()->m_auraname == SPELL_AURA_MOD_POSSESS)
|
||||
if (mode == AURA_REMOVE_BY_DELETE)
|
||||
{
|
||||
switch (Aur->GetModifier()->m_auraname)
|
||||
{
|
||||
// need properly undo any auras with player-caster mover set (or will crash at next caster move packet)
|
||||
case SPELL_AURA_MOD_POSSESS:
|
||||
case SPELL_AURA_MOD_POSSESS_PET:
|
||||
case SPELL_AURA_CONTROL_VEHICLE:
|
||||
Aur->ApplyModifier(false,true);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
Aur->ApplyModifier(false,true);
|
||||
|
||||
if (Aur->_RemoveAura())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue