Core/Unit: Store charmer and charmed pointers on Unit directly, no more map lookups for Unit::GetCharmer and Unit::GetCharmed
Port From (https://github.com/TrinityCore/TrinityCore/commit/a5989dcee9150565e7f4b8e3f7a62a414a484a3f)
This commit is contained in:
@@ -383,7 +383,7 @@ namespace Game.Entities
|
||||
base.InitSummon();
|
||||
|
||||
if (GetOwner().IsTypeId(TypeId.Player) && GetOwner().GetMinionGUID() == GetGUID()
|
||||
&& GetOwner().GetCharmGUID().IsEmpty())
|
||||
&& GetOwner().GetCharmedGUID().IsEmpty())
|
||||
{
|
||||
GetOwner().ToPlayer().CharmSpellInitialize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user