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:
hondacrx
2021-11-01 11:19:47 -04:00
parent fd24603aea
commit ffb04bffc0
12 changed files with 132 additions and 109 deletions
+1 -1
View File
@@ -1253,7 +1253,7 @@ namespace Game.DungeonFinding
error = LfgTeleportResult.Exhaustion;
else if (player.GetVehicle())
error = LfgTeleportResult.OnTransport;
else if (!player.GetCharmGUID().IsEmpty())
else if (!player.GetCharmedGUID().IsEmpty())
error = LfgTeleportResult.ImmuneToSummons;
else if (player.HasAura(9454)) // check Freeze debuff
error = LfgTeleportResult.NoReturnLocation;