Scripts/ZA: added pathing to Amani'shi Savages of the intro event

This commit is contained in:
Ovahlord
2019-03-16 18:00:16 +01:00
parent 081d69be5e
commit acd4cc2fb1
3 changed files with 131 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ public:
SetBossNumber(EncounterCount);
LoadObjectData(creatureData, gameobjectData);
_remainingSpeedRunTime = 0;
_savagesAtGateTriggered = false;
_speedRunState = NOT_STARTED;
}
@@ -133,6 +134,16 @@ public:
guardian->AI()->DoAction(ACTION_ALERT_AMANISHI_GUARDIANS);
}
break;
case DATA_TRIGGER_AMANISHI_SAVAGES:
if (_savagesAtGateTriggered)
return;
for (ObjectGuid guid : _amanishiSavageGUIDs)
{
if (Creature* savage = instance->GetCreature(guid))
savage->GetMotionMaster()->MovePath(savage->GetSpawnId() * 10, false);
}
_savagesAtGateTriggered = true;
break;
default:
break;
}
@@ -231,6 +242,7 @@ public:
GuidVector _amanishiSavageGUIDs;
uint32 _remainingSpeedRunTime;
uint32 _speedRunState;
bool _savagesAtGateTriggered;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override

View File

@@ -313,6 +313,7 @@ enum AmanishiGuardianEvents
EVENT_MOVE_TO_GATE = 1,
EVENT_FACE_TO_ENTRANCE,
EVENT_SAY_ALERT,
EVENT_TRIGGER_SAVAGES,
EVENT_MAKE_ATTACKABLE,
EVENT_REND
};
@@ -349,6 +350,8 @@ struct npc_zulaman_amanishi_guardian : public ScriptedAI
void JustEngagedWith(Unit* /*who*/) override
{
_events.ScheduleEvent(EVENT_REND, 5s, 7s);
if (InstanceScript* instance = me->GetInstanceScript())
instance->SetData(DATA_TRIGGER_AMANISHI_SAVAGES, IN_PROGRESS);
}
void EnterEvadeMode(EvadeReason why) override