mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
HG 698.
--HG-- branch : trunk
This commit is contained in:
@@ -11199,6 +11199,8 @@ void Unit::CleanupsBeforeDelete()
|
||||
{
|
||||
if(m_uint32Values) // only for fully created object
|
||||
{
|
||||
UnpossessSelf(false);
|
||||
RemoveAllFromVision();
|
||||
InterruptNonMeleeSpells(true);
|
||||
m_Events.KillAllEvents(false); // non-delatable (currently casted spells) will not deleted now but it will deleted at call in Map::RemoveAllObjectsInRemoveList
|
||||
CombatStop();
|
||||
@@ -11208,8 +11210,6 @@ void Unit::CleanupsBeforeDelete()
|
||||
RemoveAllAuras();
|
||||
RemoveAllGameObjects();
|
||||
RemoveAllDynObjects();
|
||||
UnpossessSelf(false);
|
||||
RemoveAllFromVision();
|
||||
GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
|
||||
}
|
||||
RemoveFromWorld();
|
||||
@@ -12400,7 +12400,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT
|
||||
return CastingTime;
|
||||
}
|
||||
|
||||
void Unit::UpdateAuraForGroup(uint8 slot)
|
||||
void Unit::UpdateAuraForGroup(uint8 slot, bool apply)
|
||||
{
|
||||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -12408,7 +12408,10 @@ void Unit::UpdateAuraForGroup(uint8 slot)
|
||||
if(player->GetGroup())
|
||||
{
|
||||
player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_AURAS);
|
||||
player->SetAuraUpdateMask(slot);
|
||||
if(apply)
|
||||
player->SetAuraUpdateMask(slot);
|
||||
else
|
||||
player->UnsetAuraUpdateMask(slot);
|
||||
}
|
||||
}
|
||||
else if(GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||
@@ -12420,7 +12423,10 @@ void Unit::UpdateAuraForGroup(uint8 slot)
|
||||
if(owner && (owner->GetTypeId() == TYPEID_PLAYER) && ((Player*)owner)->GetGroup())
|
||||
{
|
||||
((Player*)owner)->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_AURAS);
|
||||
pet->SetAuraUpdateMask(slot);
|
||||
if(apply)
|
||||
pet->SetAuraUpdateMask(slot);
|
||||
else
|
||||
pet->UnsetAuraUpdateMask(slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user