mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(Scripts/Northrend): Dalaran guards now ignore non-combat pets (#23939)
This commit is contained in:
@@ -428,7 +428,7 @@ public:
|
||||
|
||||
struct npc_mageguard_dalaranAI : public ScriptedAI
|
||||
{
|
||||
npc_mageguard_dalaranAI(Creature* creature) : ScriptedAI(creature)
|
||||
explicit npc_mageguard_dalaranAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
creature->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_NORMAL, true);
|
||||
@@ -449,6 +449,9 @@ public:
|
||||
if (!me->IsWithinDist(who, 5.0f, false))
|
||||
return;
|
||||
|
||||
if (who->IsCreature() && who->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET)
|
||||
return;
|
||||
|
||||
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
|
||||
if (!player || player->IsGameMaster() || player->IsBeingTeleported() || (player->GetPositionZ() > 670 && player->GetVehicle()) ||
|
||||
@@ -484,7 +487,6 @@ public:
|
||||
break;
|
||||
}
|
||||
me->SetOrientation(me->GetHomePosition().GetOrientation());
|
||||
return;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override {}
|
||||
|
||||
Reference in New Issue
Block a user