mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
feature(SmartAI/Movement) - Unify waypoint systems (#23251)
This commit is contained in:
@@ -128,7 +128,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SUMMONED_2, 2s);
|
||||
break;
|
||||
case EVENT_SUMMONED_2:
|
||||
me->GetMotionMaster()->MovePath(GYTH_PATH_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(GYTH_PATH_1, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -362,10 +362,10 @@ public:
|
||||
break;
|
||||
case EVENT_PATH_NEFARIUS:
|
||||
if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
|
||||
victor->GetMotionMaster()->MovePath(NEFARIUS_PATH_1, true);
|
||||
victor->GetMotionMaster()->MoveWaypoint(NEFARIUS_PATH_1, true);
|
||||
break;
|
||||
case EVENT_PATH_REND:
|
||||
me->GetMotionMaster()->MovePath(REND_PATH_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(REND_PATH_1, false);
|
||||
break;
|
||||
case EVENT_TELEPORT_1:
|
||||
me->NearTeleportTo(194.2993f, -474.0814f, 121.4505f, -0.01225555f);
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
|
||||
if (_beastReached)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(BEAST_MOVEMENT_ID, true);
|
||||
me->GetMotionMaster()->MoveWaypoint(BEAST_MOVEMENT_ID, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
if (!_beastReached)
|
||||
{
|
||||
_beastReached = true;
|
||||
me->GetMotionMaster()->MovePath(BEAST_MOVEMENT_ID, true);
|
||||
me->GetMotionMaster()->MoveWaypoint(BEAST_MOVEMENT_ID, true);
|
||||
|
||||
// There is a chance player logged in between areatriggers (realm crash or restart)
|
||||
// executing part of script which happens when player enters boss room
|
||||
|
||||
@@ -244,7 +244,7 @@ class go_chromaggus_lever : public GameObjectScript
|
||||
if (Creature* creature = _instance->GetCreature(DATA_CHROMAGGUS))
|
||||
{
|
||||
creature->SetHomePosition(homePos);
|
||||
creature->GetMotionMaster()->MovePath(creature->GetEntry() * 10, false);
|
||||
creature->GetMotionMaster()->MoveWaypoint(creature->GetEntry() * 10, false);
|
||||
creature->AI()->SetGUID(player->GetGUID(), GUID_LEVER_USER);
|
||||
}
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@ public:
|
||||
nefarian->setActive(true);
|
||||
nefarian->SetCanFly(true);
|
||||
nefarian->SetDisableGravity(true);
|
||||
nefarian->GetMotionMaster()->MovePath(NEFARIAN_PATH, false);
|
||||
nefarian->GetMotionMaster()->MoveWaypoint(NEFARIAN_PATH, false);
|
||||
}
|
||||
|
||||
events.Reset();
|
||||
@@ -406,7 +406,7 @@ public:
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_PATH_2:
|
||||
me->GetMotionMaster()->MovePath(NEFARIUS_PATH_2, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(NEFARIUS_PATH_2, false);
|
||||
events.ScheduleEvent(EVENT_CHAOS_1, 7s);
|
||||
break;
|
||||
case EVENT_CHAOS_1:
|
||||
@@ -438,7 +438,7 @@ public:
|
||||
me->DespawnOrUnsummon(1s);
|
||||
break;
|
||||
case EVENT_PATH_3:
|
||||
me->GetMotionMaster()->MovePath(NEFARIUS_PATH_3, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(NEFARIUS_PATH_3, false);
|
||||
break;
|
||||
case EVENT_START_EVENT:
|
||||
BeginEvent();
|
||||
|
||||
@@ -183,7 +183,7 @@ struct boss_nightbane : public BossAI
|
||||
me->GetMotionMaster()->MoveTakeoff(POINT_INTRO_TAKE_OFF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 10.0f, 13.99879f);
|
||||
}).Schedule(4s, [this](TaskContext /*context*/)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry()*10, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*10, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -400,7 +400,7 @@ struct boss_nightbane : public BossAI
|
||||
{
|
||||
scheduler.Schedule(0s, [this](TaskContext /*context*/)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry()*10+1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*10+1, false);
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
{
|
||||
if (Creature* kalecgos = instance->SummonCreature(NPC_KALECGOS, KalecgosSpawnPos))
|
||||
{
|
||||
kalecgos->GetMotionMaster()->MovePath(PATH_KALECGOS_FLIGHT, false);
|
||||
kalecgos->GetMotionMaster()->MoveWaypoint(PATH_KALECGOS_FLIGHT, false);
|
||||
kalecgos->AI()->Talk(SAY_KALECGOS_SPAWN);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
Talk(SAY_BREAKOUT0);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
|
||||
}, 5s);
|
||||
}
|
||||
|
||||
@@ -167,13 +167,13 @@ public:
|
||||
}
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.6724f, -6032.0527f, 134.82213f, 4.654973506927490234f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath(NPC_CRIMSON_ACOLYTE * 10, false);
|
||||
acolyte->GetMotionMaster()->MoveWaypoint(NPC_CRIMSON_ACOLYTE * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.0055f, -6031.893f, 134.82211f, 0.401425719261169433f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 1) * 10, false);
|
||||
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 1) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1639.7053f, -6031.7373f, 134.82213f, 2.443460941314697265f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 2) * 10, false);
|
||||
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 2) * 10, false);
|
||||
break;
|
||||
case 1:
|
||||
Talk(SAY_BREAKOUT4);
|
||||
@@ -182,13 +182,13 @@ public:
|
||||
valroth->AI()->Talk(SAY_VALROTH_WAVE2);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.7958f, -6030.307f, 134.82211f, 4.65355682373046875f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 3) * 10, false);
|
||||
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 3) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.7305f, -6030.751f, 134.82211f, 6.143558979034423828f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 4) * 10, false);
|
||||
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 4) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1639.4657f, -6030.404f, 134.82211f, 4.502949237823486328f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 5) * 10, false);
|
||||
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 5) * 10, false);
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_BREAKOUT5);
|
||||
@@ -197,16 +197,16 @@ public:
|
||||
valroth->AI()->Talk(SAY_VALROTH_WAVE3);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.3405f, -6031.436f, 134.82211f, 4.612849712371826171f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 6) * 10, false);
|
||||
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 6) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.0404f, -6030.3843f, 134.82211f, 1.378810048103332519f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 7) * 10, false);
|
||||
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 7) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.1162f, -6029.7817f, 134.82211f, 5.707226753234863281f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 8) * 10, false);
|
||||
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 8) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.9948f, -6029.8027f, 134.82211f, 1.605702877044677734f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 9) * 10, false);
|
||||
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 9) * 10, false);
|
||||
break;
|
||||
case 3:
|
||||
Talk(SAY_BREAKOUT6);
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
{
|
||||
valroth->AI()->Talk(SAY_VALROTH_AGGRO);
|
||||
valroth->SetReactState(REACT_AGGRESSIVE);
|
||||
valroth->GetMotionMaster()->MovePath(NPC_HIGH_INQUISITOR_VALROTH * 10, false);
|
||||
valroth->GetMotionMaster()->MoveWaypoint(NPC_HIGH_INQUISITOR_VALROTH * 10, false);
|
||||
}
|
||||
return;
|
||||
default:
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
SetInvincibility(true);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->GetMotionMaster()->MovePath((me->GetEntry() + 1) * 10, false);
|
||||
me->GetMotionMaster()->MoveWaypoint((me->GetEntry() + 1) * 10, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -610,7 +610,7 @@ public:
|
||||
// Start waypoint movement using WaypointMovementGenerator
|
||||
if (uint32 pathId = me->GetWaypointPath())
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(pathId, true); // true = repeatable
|
||||
me->GetMotionMaster()->MoveWaypoint(pathId, true); // true = repeatable
|
||||
}
|
||||
// Schedule the first ritual after 20-30s
|
||||
events.ScheduleEvent(EVENT_START_RITUAL, 20s, 30s);
|
||||
@@ -797,7 +797,7 @@ public:
|
||||
// Start waypoint movement using WaypointMovementGenerator
|
||||
if (uint32 pathId = me->GetWaypointPath())
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(pathId, true); // true = repeatable
|
||||
me->GetMotionMaster()->MoveWaypoint(pathId, true); // true = repeatable
|
||||
}
|
||||
// Schedule the first ritual after 50-60s
|
||||
events.ScheduleEvent(EVENT_START_RITUAL, 50s, 60s);
|
||||
|
||||
@@ -504,7 +504,7 @@ public:
|
||||
tirion->AI()->Talk(SAY_LIGHT_OF_DAWN25, 4s);
|
||||
|
||||
tirion->m_Events.AddEventAtOffset([&, tirion] {
|
||||
tirion->GetMotionMaster()->MovePath(NPC_HIGHLORD_TIRION_FORDRING * 10, false);
|
||||
tirion->GetMotionMaster()->MoveWaypoint(NPC_HIGHLORD_TIRION_FORDRING * 10, false);
|
||||
}, 14s);
|
||||
|
||||
events.Reset();
|
||||
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
switch (events2.ExecuteEvent())
|
||||
{
|
||||
case INTRO_1:
|
||||
me->GetMotionMaster()->MovePath(KIRTONOS_PATH, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(KIRTONOS_PATH, false);
|
||||
Talk(EMOTE_SUMMONED);
|
||||
break;
|
||||
case INTRO_2:
|
||||
|
||||
@@ -157,7 +157,7 @@ struct boss_felmyst : public BossAI
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, true);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ struct boss_felmyst : public BossAI
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
me->SetImmuneToPC(false);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, true);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, true);
|
||||
}, 8500ms);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ struct boss_nalorakk : public BossAI
|
||||
{
|
||||
_introScheduler.CancelGroup(GROUP_CHECK_DEAD);
|
||||
_waveList.clear();
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry()*100+1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*100+1, false);
|
||||
Talk(SAY_RUN_AWAY);
|
||||
_introScheduler.Schedule(5s, [this](TaskContext)
|
||||
{
|
||||
@@ -153,7 +153,7 @@ struct boss_nalorakk : public BossAI
|
||||
_introScheduler.CancelGroup(GROUP_CHECK_DEAD);
|
||||
_waveList.clear();
|
||||
Talk(SAY_RUN_AWAY);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry()*100+2, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*100+2, false);
|
||||
_introScheduler.Schedule(6s, [this](TaskContext)
|
||||
{
|
||||
me->SetFacingTo(1.54f);
|
||||
@@ -176,7 +176,7 @@ struct boss_nalorakk : public BossAI
|
||||
_introScheduler.CancelGroup(GROUP_CHECK_DEAD);
|
||||
_waveList.clear();
|
||||
Talk(SAY_RUN_AWAY);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 100 + 3, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 100 + 3, false);
|
||||
_introScheduler.Schedule(6s, [this](TaskContext)
|
||||
{
|
||||
me->SetFacingTo(1.54f);
|
||||
|
||||
@@ -400,7 +400,7 @@ struct npc_harrison_jones : public ScriptedAI
|
||||
Talk(SAY_HARRISON_0);
|
||||
scheduler.Schedule(2s, [this](TaskContext /*task*/)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(HARRISON_MOVE_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(HARRISON_MOVE_1, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -448,7 +448,7 @@ struct npc_harrison_jones : public ScriptedAI
|
||||
// Players are Now Saved to instance at SPECIAL (Player should be notified?)
|
||||
scheduler.Schedule(500ms, [this](TaskContext /*task*/)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(HARRISON_MOVE_2, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(HARRISON_MOVE_2, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -521,7 +521,7 @@ struct npc_harrison_jones : public ScriptedAI
|
||||
{
|
||||
DoCastSelf(SPELL_STEALTH);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
me->GetMotionMaster()->MovePath(HARRISON_MOVE_3, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(HARRISON_MOVE_3, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -592,7 +592,7 @@ struct npc_amanishi_lookout : public NullCreatureAI
|
||||
Talk(SAY_INVADERS);
|
||||
me->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetUnitFlag(UNIT_FLAG_RENAME);
|
||||
me->GetMotionMaster()->MovePath(PATH_LOOKOUT, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_LOOKOUT, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ struct boss_gahzranka : public BossAI
|
||||
|
||||
void IsSummonedBy(WorldObject* /*summoner*/) override
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
|
||||
@@ -140,7 +140,7 @@ struct boss_jeklik : public BossAI
|
||||
me->SetDisableGravity(true);
|
||||
DoCastSelf(SPELL_BAT_FORM, true);
|
||||
|
||||
me->GetMotionMaster()->MovePath(PATH_JEKLIK_INTRO, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_JEKLIK_INTRO, false);
|
||||
}
|
||||
|
||||
void PathEndReached(uint32 pathId) override
|
||||
@@ -295,7 +295,7 @@ struct npc_batrider : public CreatureAI
|
||||
me->SetSpeed(MOVE_WALK, 5.0f, true);
|
||||
|
||||
me->SetCanFly(true);
|
||||
me->GetMotionMaster()->MoveSplinePath(PATH_BATRIDER_LOOP);
|
||||
me->GetMotionMaster()->MovePath(PATH_BATRIDER_LOOP);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -375,7 +375,7 @@ struct npc_batrider : public CreatureAI
|
||||
if (!me->isMoving())
|
||||
{
|
||||
me->SetCanFly(true);
|
||||
me->GetMotionMaster()->MoveSplinePath(PATH_BATRIDER_LOOP);
|
||||
me->GetMotionMaster()->MovePath(PATH_BATRIDER_LOOP);
|
||||
}
|
||||
}
|
||||
else if (_mode == BATRIDER_MODE_TRASH)
|
||||
|
||||
@@ -182,13 +182,13 @@ struct npc_cameron : public ScriptedAI
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_WP_START_GOLDSHIRE:
|
||||
me->GetMotionMaster()->MovePath(GOLDSHIRE_PATH, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(GOLDSHIRE_PATH, false);
|
||||
break;
|
||||
case EVENT_WP_START_WOODS:
|
||||
me->GetMotionMaster()->MovePath(WOODS_PATH, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOODS_PATH, false);
|
||||
break;
|
||||
case EVENT_WP_START_HOUSE:
|
||||
me->GetMotionMaster()->MovePath(HOUSE_PATH, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(HOUSE_PATH, false);
|
||||
break;
|
||||
case EVENT_WP_START_LISA:
|
||||
for (uint32 i = 0; i < _childrenGUIDs.size(); ++i)
|
||||
@@ -197,7 +197,7 @@ struct npc_cameron : public ScriptedAI
|
||||
{
|
||||
if (lisa->GetEntry() == NPC_LISA)
|
||||
{
|
||||
lisa->GetMotionMaster()->MovePath(LISA_PATH, false);
|
||||
lisa->GetMotionMaster()->MoveWaypoint(LISA_PATH, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -233,7 +233,7 @@ struct npc_cameron : public ScriptedAI
|
||||
child->SearchFormation();
|
||||
|
||||
// Start movement
|
||||
me->GetMotionMaster()->MovePath(STORMWIND_PATH, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(STORMWIND_PATH, false);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -386,7 +386,7 @@ struct npc_eastvale_peasent : public ScriptedAI
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
me->CastSpell(me, SPELL_TRANSFORM_PEASENT_WITH_WOOD);
|
||||
me->SetSpeed(MOVE_WALK, 1.0f);
|
||||
me->GetMotionMaster()->MovePath(_path, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(_path, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ struct npc_eastvale_peasent : public ScriptedAI
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_MOVETORAELEN:
|
||||
me->GetMotionMaster()->MovePath(_path + 1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(_path + 1, false);
|
||||
break;
|
||||
case EVENT_TALKTORAELEN1:
|
||||
if (Creature* realen = me->FindNearestCreature(NPC_SUPERVISOR_RAELEN, 2.0f, true))
|
||||
@@ -492,7 +492,7 @@ struct npc_eastvale_peasent : public ScriptedAI
|
||||
case EVENT_PATHBACK:
|
||||
if (Creature* realen = ObjectAccessor::GetCreature(*me, _realenGUID))
|
||||
realen->AI()->SetData(1, 1);
|
||||
me->GetMotionMaster()->MovePath(_path + 2, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(_path + 2, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ struct npc_partygoer_pather : public ScriptedAI
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_PATH:
|
||||
me->GetMotionMaster()->MovePath(_path, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(_path, false);
|
||||
break;
|
||||
case EVENT_RANDOM_ACTION_PATHER:
|
||||
{
|
||||
|
||||
@@ -539,16 +539,16 @@ public:
|
||||
break;
|
||||
case 3:
|
||||
me->SetWalk(true);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 100, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 100, false);
|
||||
if (Creature* c = me->FindNearestCreature(NPC_THERON, 60.0f, true))
|
||||
{
|
||||
c->SetWalk(true);
|
||||
c->GetMotionMaster()->MovePath(c->GetEntry() * 100, false);
|
||||
c->GetMotionMaster()->MoveWaypoint(c->GetEntry() * 100, false);
|
||||
}
|
||||
if (Creature* c = me->FindNearestCreature(NPC_AURIC, 60.0f, true))
|
||||
{
|
||||
c->SetWalk(true);
|
||||
c->GetMotionMaster()->MovePath(c->GetEntry() * 100, false);
|
||||
c->GetMotionMaster()->MoveWaypoint(c->GetEntry() * 100, false);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
|
||||
@@ -1321,22 +1321,22 @@ public:
|
||||
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
|
||||
{
|
||||
allianceGuardsGUID.push_back(temp->GetGUID());
|
||||
temp->GetMotionMaster()->MovePath(NPC_SW_SOLDIER * 10, false);
|
||||
temp->GetMotionMaster()->MoveWaypoint(NPC_SW_SOLDIER * 10, false);
|
||||
}
|
||||
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
|
||||
{
|
||||
allianceGuardsGUID.push_back(temp->GetGUID());
|
||||
temp->GetMotionMaster()->MovePath((NPC_SW_SOLDIER * 10) + 1, false);
|
||||
temp->GetMotionMaster()->MoveWaypoint((NPC_SW_SOLDIER * 10) + 1, false);
|
||||
}
|
||||
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
|
||||
{
|
||||
allianceGuardsGUID.push_back(temp->GetGUID());
|
||||
temp->GetMotionMaster()->MovePath((NPC_SW_SOLDIER * 10) + 2, false);
|
||||
temp->GetMotionMaster()->MoveWaypoint((NPC_SW_SOLDIER * 10) + 2, false);
|
||||
}
|
||||
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
|
||||
{
|
||||
allianceGuardsGUID.push_back(temp->GetGUID());
|
||||
temp->GetMotionMaster()->MovePath((NPC_SW_SOLDIER * 10) + 3, false);
|
||||
temp->GetMotionMaster()->MoveWaypoint((NPC_SW_SOLDIER * 10) + 3, false);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
@@ -1348,7 +1348,7 @@ public:
|
||||
case 10:
|
||||
if (Unit* temp = me->SummonCreature(NPC_DREADLORD, AllianceSpawn[11].x, AllianceSpawn[11].y, AllianceSpawn[11].z, TEMPSUMMON_DEAD_DESPAWN))
|
||||
{
|
||||
temp->GetMotionMaster()->MovePath(NPC_DREADLORD * 10, false);
|
||||
temp->GetMotionMaster()->MoveWaypoint(NPC_DREADLORD * 10, false);
|
||||
temp->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
|
||||
temp->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK_DEST, true);
|
||||
}
|
||||
@@ -1536,7 +1536,7 @@ public:
|
||||
case 8:
|
||||
if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
|
||||
{
|
||||
jaina->GetMotionMaster()->MovePath(NPC_JAINA * 10, false);
|
||||
jaina->GetMotionMaster()->MoveWaypoint(NPC_JAINA * 10, false);
|
||||
jaina->setActive(true);
|
||||
}
|
||||
bStepping = false;
|
||||
@@ -2537,9 +2537,9 @@ public:
|
||||
{
|
||||
case 0: // Vortex
|
||||
if (Creature* whirlwind1 = me->SummonCreature(NPC_VORTEX, ThrallSpawn[0].x, ThrallSpawn[0].y, ThrallSpawn[0].z, ThrallSpawn[0].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30 * IN_MILLISECONDS))
|
||||
whirlwind1->GetMotionMaster()->MovePath(NPC_WHIRLWIND * 10, false);
|
||||
whirlwind1->GetMotionMaster()->MoveWaypoint(NPC_WHIRLWIND * 10, false);
|
||||
if (Creature* whirlwind2 = me->SummonCreature(NPC_VORTEX, ThrallSpawn[0].x, ThrallSpawn[0].y, ThrallSpawn[0].z, ThrallSpawn[0].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30 * IN_MILLISECONDS))
|
||||
whirlwind2->GetMotionMaster()->MovePath(NPC_WHIRLWIND * 100, false);
|
||||
whirlwind2->GetMotionMaster()->MoveWaypoint(NPC_WHIRLWIND * 100, false);
|
||||
break;
|
||||
case 1:
|
||||
// BATTLING_COURTYARD Initial Spawn
|
||||
@@ -2762,7 +2762,7 @@ public:
|
||||
{
|
||||
hordeGuardsGUID.push_back(temp->GetGUID());
|
||||
temp->AI()->Talk(SAY_FOR_THE_HORDE);
|
||||
temp->GetMotionMaster()->MovePath(NPC_WARSONG_BATTLEGUARD * 100, false);
|
||||
temp->GetMotionMaster()->MoveWaypoint(NPC_WARSONG_BATTLEGUARD * 100, false);
|
||||
}
|
||||
break;
|
||||
// Valimathras Room Preparation
|
||||
@@ -2975,7 +2975,7 @@ public:
|
||||
me->SetWalk(false);
|
||||
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasfollowGUID))
|
||||
{
|
||||
sylvanas->GetMotionMaster()->MovePath(NPC_SYLVANAS * 100, false);
|
||||
sylvanas->GetMotionMaster()->MoveWaypoint(NPC_SYLVANAS * 100, false);
|
||||
sylvanas->setActive(true);
|
||||
}
|
||||
break;
|
||||
@@ -3007,7 +3007,7 @@ public:
|
||||
SetEscortPaused(false);
|
||||
me->SetWalk(true);
|
||||
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasfollowGUID))
|
||||
sylvanas->GetMotionMaster()->MovePath(NPC_SYLVANAS * 1000, false);
|
||||
sylvanas->GetMotionMaster()->MoveWaypoint(NPC_SYLVANAS * 1000, false);
|
||||
JumpToNextStep(3 * IN_MILLISECONDS);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ struct npc_costumed_orphan_matron : public ScriptedAI
|
||||
GetInitXYZ(x, y, z, o, path);
|
||||
if (Creature* cr = me->SummonCreature(NPC_SHADE_OF_HORSEMAN, x, y, z, o, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
|
||||
{
|
||||
cr->GetMotionMaster()->MovePath(path, true);
|
||||
cr->GetMotionMaster()->MoveWaypoint(path, true);
|
||||
cr->AI()->DoAction(path);
|
||||
horseGUID = cr->GetGUID();
|
||||
}
|
||||
@@ -1191,7 +1191,7 @@ struct boss_headless_horseman : public ScriptedAI
|
||||
break;
|
||||
case 3:
|
||||
me->SetDisableGravity(true);
|
||||
me->GetMotionMaster()->MovePath(236820, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(236820, false);
|
||||
me->CastSpell(me, SPELL_SHAKE_CAMERA_SMALL, true);
|
||||
player->Say(TALK_PLAYER_FELT_DEATH);
|
||||
Talk(TALK_ENTRANCE);
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
Talk(SAY_ONSPAWN, 1200ms);
|
||||
|
||||
if (action == DATA_ANETHERON)
|
||||
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
|
||||
}
|
||||
|
||||
void PathEndReached(uint32 pathId) override
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
case ALLIANCE_BASE_CHARGE_3:
|
||||
me->m_Events.AddEventAtOffset([this]()
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
|
||||
}, 1s);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
Talk(SAY_ONSPAWN, 1200ms);
|
||||
|
||||
if (action == DATA_AZGALOR)
|
||||
me->GetMotionMaster()->MovePath(HORDE_BOSS_PATH, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(HORDE_BOSS_PATH, false);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit * victim) override
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
Talk(SAY_ONSPAWN, 1200ms);
|
||||
|
||||
if (action == DATA_KAZROGAL)
|
||||
me->GetMotionMaster()->MovePath(HORDE_BOSS_PATH, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(HORDE_BOSS_PATH, false);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit * victim) override
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
Talk(SAY_ONSPAWN, 1200ms);
|
||||
|
||||
if (action == DATA_WINTERCHILL)
|
||||
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
|
||||
}
|
||||
|
||||
void PathEndReached(uint32 pathId) override
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
case ALLIANCE_BASE_CHARGE_3:
|
||||
me->m_Events.AddEventAtOffset([this]()
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
|
||||
}, 1s);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
else
|
||||
{
|
||||
creature->AI()->Talk(SAY_SUCCESS);
|
||||
creature->GetMotionMaster()->MovePath(JAINA_RETREAT_PATH, false);
|
||||
creature->GetMotionMaster()->MoveWaypoint(JAINA_RETREAT_PATH, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -493,15 +493,15 @@ struct npc_hyjal_ground_trash : public ScriptedAI
|
||||
case DATA_WINTERCHILL:
|
||||
case DATA_ANETHERON:
|
||||
case DATA_ALLIANCE_RETREAT:
|
||||
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
|
||||
break;
|
||||
case DATA_KAZROGAL:
|
||||
case DATA_AZGALOR:
|
||||
case DATA_HORDE_RETREAT:
|
||||
me->GetMotionMaster()->MovePath(urand(HORDE_BASE_CHARGE_1, HORDE_BASE_CHARGE_3), false);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(HORDE_BASE_CHARGE_1, HORDE_BASE_CHARGE_3), false);
|
||||
break;
|
||||
case DATA_ARCHIMONDE:
|
||||
me->GetMotionMaster()->MovePath(urand(NIGHT_ELF_BASE_CHARGE_1, NIGHT_ELF_BASE_CHARGE_3), false);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(NIGHT_ELF_BASE_CHARGE_1, NIGHT_ELF_BASE_CHARGE_3), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -517,7 +517,7 @@ struct npc_hyjal_ground_trash : public ScriptedAI
|
||||
case ALLIANCE_BASE_CHARGE_3:
|
||||
me->m_Events.AddEventAtOffset([this]()
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
|
||||
}, 1s);
|
||||
break;
|
||||
case HORDE_BASE_CHARGE_1:
|
||||
@@ -525,7 +525,7 @@ struct npc_hyjal_ground_trash : public ScriptedAI
|
||||
case HORDE_BASE_CHARGE_3:
|
||||
me->m_Events.AddEventAtOffset([this]()
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(urand(HORDE_BASE_PATROL_1, HORDE_BASE_PATROL_3), true);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(HORDE_BASE_PATROL_1, HORDE_BASE_PATROL_3), true);
|
||||
}, 1s);
|
||||
break;
|
||||
case NIGHT_ELF_BASE_CHARGE_1:
|
||||
@@ -616,9 +616,9 @@ struct npc_hyjal_gargoyle : public ScriptedAI
|
||||
case DATA_AZGALOR:
|
||||
case DATA_HORDE_RETREAT:
|
||||
if (me->GetPositionX() < 5500.f)
|
||||
me->GetMotionMaster()->MovePath(urand(GARGOYLE_PATH_FORTRESS_1, GARGOYLE_PATH_FORTRESS_3), false);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(GARGOYLE_PATH_FORTRESS_1, GARGOYLE_PATH_FORTRESS_3), false);
|
||||
else
|
||||
me->GetMotionMaster()->MovePath(urand(GARGOYLE_PATH_TROLL_CAMP_1, GARGOYLE_PATH_TROLL_CAMP_3), false);
|
||||
me->GetMotionMaster()->MoveWaypoint(urand(GARGOYLE_PATH_TROLL_CAMP_1, GARGOYLE_PATH_TROLL_CAMP_3), false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -687,9 +687,9 @@ struct npc_hyjal_frost_wyrm : public ScriptedAI
|
||||
case DATA_AZGALOR:
|
||||
case DATA_HORDE_RETREAT:
|
||||
if (me->GetPositionX() < 5500.f)
|
||||
me->GetMotionMaster()->MovePath(FROST_WYRM_FORTRESS, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(FROST_WYRM_FORTRESS, false);
|
||||
else
|
||||
me->GetMotionMaster()->MovePath(FROST_WYRM_TROLL_CAMP, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(FROST_WYRM_TROLL_CAMP, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -702,7 +702,7 @@ struct npc_hyjal_frost_wyrm : public ScriptedAI
|
||||
{
|
||||
me->m_Events.AddEventAtOffset([this]()
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(FROST_WYRM_FORTRESS_PATROL, true);
|
||||
me->GetMotionMaster()->MoveWaypoint(FROST_WYRM_FORTRESS_PATROL, true);
|
||||
}, 1s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ struct boss_lieutenant_drake : public BossAI
|
||||
{
|
||||
runSecondPath = false;
|
||||
pathId = me->GetEntry() * 10;
|
||||
me->GetMotionMaster()->MovePath(pathId, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(pathId, false);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
@@ -132,7 +132,7 @@ struct boss_lieutenant_drake : public BossAI
|
||||
if (runSecondPath)
|
||||
{
|
||||
runSecondPath = false;
|
||||
me->GetMotionMaster()->MovePath(pathId, true);
|
||||
me->GetMotionMaster()->MoveWaypoint(pathId, true);
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
Talk(SAY_QUEST_ACCEPTED);
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE);
|
||||
me->GetMotionMaster()->MovePath(PATH_ESCORT, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_ESCORT, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ struct boss_ayamiss : public BossAI
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetCanFly(false);
|
||||
me->SetDisableGravity(false);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
|
||||
DoResetThreatList();
|
||||
scheduler.CancelGroup(GROUP_AIR);
|
||||
});
|
||||
@@ -291,7 +291,7 @@ class spell_ayamiss_swarmer_teleport_trigger : public SpellScript
|
||||
uint32 pathId = data.pathId;
|
||||
caster->m_Events.AddEventAtOffset([caster, pathId]()
|
||||
{
|
||||
caster->GetMotionMaster()->MovePath(pathId, false);
|
||||
caster->GetMotionMaster()->MoveWaypoint(pathId, false);
|
||||
}, 1s);
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ public:
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
GetCaster()->ToCreature()->GetMotionMaster()->Clear();
|
||||
GetCaster()->ToCreature()->GetMotionMaster()->MovePath(_pathId, false);
|
||||
GetCaster()->ToCreature()->GetMotionMaster()->MoveWaypoint(_pathId, false);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -188,7 +188,7 @@ struct boss_ossirian : public BossAI
|
||||
{
|
||||
if (Creature* vortex = me->SummonCreature(NPC_SAND_VORTEX, pos))
|
||||
{
|
||||
vortex->GetMotionMaster()->MovePath(pathIds.front(), true);
|
||||
vortex->GetMotionMaster()->MoveWaypoint(pathIds.front(), true);
|
||||
pathIds.reverse();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
|
||||
if (me->GetEntry() == NPC_VEM)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(VEM_WAYPOINT_PATH, true);
|
||||
me->GetMotionMaster()->MoveWaypoint(VEM_WAYPOINT_PATH, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@ public:
|
||||
{
|
||||
if (Creature* add = instance->GetCreature(*addsAtBase.begin()))
|
||||
{
|
||||
add->GetMotionMaster()->MovePath(PATH_ADDS, false);
|
||||
add->GetMotionMaster()->MoveWaypoint(PATH_ADDS, false);
|
||||
movedadds.push_back(add->GetGUID());
|
||||
}
|
||||
|
||||
|
||||
@@ -121,11 +121,11 @@ public:
|
||||
|
||||
// Xinef: cannot use pathfinding...
|
||||
if (summon->GetDistance(477.0f, 618.0f, 771.0f) < 5.0f)
|
||||
summon->GetMotionMaster()->MovePath(3000012, false);
|
||||
summon->GetMotionMaster()->MoveWaypoint(3000012, false);
|
||||
else if (summon->GetDistance(583.0f, 617.0f, 771.0f) < 5.0f)
|
||||
summon->GetMotionMaster()->MovePath(3000013, false);
|
||||
summon->GetMotionMaster()->MoveWaypoint(3000013, false);
|
||||
else if (summon->GetDistance(581.0f, 608.5f, 739.0f) < 5.0f)
|
||||
summon->GetMotionMaster()->MovePath(3000014, false);
|
||||
summon->GetMotionMaster()->MoveWaypoint(3000014, false);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
|
||||
@@ -1071,7 +1071,7 @@ public:
|
||||
Talk(SAY_TENEBRON_RESPOND);
|
||||
me->SetCanFly(true);
|
||||
me->SetSpeed(MOVE_FLIGHT, 3.0f);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1254,7 +1254,7 @@ public:
|
||||
Talk(SAY_SHADRON_RESPOND);
|
||||
me->SetCanFly(true);
|
||||
me->SetSpeed(MOVE_FLIGHT, 3.0f);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1370,7 +1370,7 @@ public:
|
||||
Talk(SAY_SHADRON_RESPOND);
|
||||
me->SetCanFly(true);
|
||||
me->SetSpeed(MOVE_FLIGHT, 3.0f);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
{
|
||||
for (int8 i = 0; outroPositions[i].entry[GetTeamIdInInstance()] != 0; ++i)
|
||||
if (Creature* summon = instance->SummonCreature(outroPositions[i].entry[GetTeamIdInInstance()], outroPositions[i].startPosition))
|
||||
summon->GetMotionMaster()->MovePath(outroPositions[i].pathId, false);
|
||||
summon->GetMotionMaster()->MoveWaypoint(outroPositions[i].pathId, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -369,7 +369,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_TYRANNUS_EVENT_GUID)))
|
||||
c->GetMotionMaster()->MovePath(PATH_BEGIN_VALUE + 10, false);
|
||||
c->GetMotionMaster()->MoveWaypoint(PATH_BEGIN_VALUE + 10, false);
|
||||
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_LEADER_FIRST_GUID)))
|
||||
c->AI()->Talk(c->GetEntry() == NPC_JAINA_PART1 ? SAY_JAINA_KRICK_2 : SAY_SYLVANAS_KRICK_2);
|
||||
}
|
||||
@@ -440,7 +440,7 @@ public:
|
||||
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_LEADER_FIRST_GUID)))
|
||||
{
|
||||
c->AI()->Talk(c->GetEntry() == NPC_JAINA_PART1 ? SAY_JAINA_KRICK_3 : SAY_SYLVANAS_KRICK_3);
|
||||
c->GetMotionMaster()->MovePath(PATH_BEGIN_VALUE + 11, false);
|
||||
c->GetMotionMaster()->MoveWaypoint(PATH_BEGIN_VALUE + 11, false);
|
||||
}
|
||||
}
|
||||
me->setActive(false);
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
{
|
||||
c->RemoveAura(46598);
|
||||
c->GetMotionMaster()->Clear();
|
||||
c->GetMotionMaster()->MovePath(PATH_BEGIN_VALUE + 18, true);
|
||||
c->GetMotionMaster()->MoveWaypoint(PATH_BEGIN_VALUE + 18, true);
|
||||
}
|
||||
me->SetHomePosition(exitPos);
|
||||
me->GetMotionMaster()->MoveJump(exitPos, 10.0f, 2.0f);
|
||||
|
||||
@@ -551,7 +551,7 @@ public:
|
||||
while (FBSData[i].entry)
|
||||
{
|
||||
if (Creature* c = me->SummonCreature(FBSData[i].entry, 688.69f + i * 1.8f, FBSSpawnPos.GetPositionY() + (float)irand(-2, 2), FBSSpawnPos.GetPositionZ(), 3 * M_PI / 2))
|
||||
c->GetMotionMaster()->MovePath(FBSData[i].pathId, false);
|
||||
c->GetMotionMaster()->MoveWaypoint(FBSData[i].pathId, false);
|
||||
++i;
|
||||
}
|
||||
events.RescheduleEvent(2, 3s);
|
||||
@@ -1284,7 +1284,7 @@ public:
|
||||
events.RescheduleEvent(8, 2s);
|
||||
break;
|
||||
case 8:
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() == NPC_JAINA_PART2 ? PATH_BEGIN_VALUE + 16 : PATH_BEGIN_VALUE + 17, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() == NPC_JAINA_PART2 ? PATH_BEGIN_VALUE + 16 : PATH_BEGIN_VALUE + 17, false);
|
||||
break;
|
||||
case 10:
|
||||
if (Creature* x = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_MARTIN_OR_GORKUN_GUID)))
|
||||
|
||||
@@ -533,7 +533,7 @@ public:
|
||||
case EVENT_SAURFANG_RUN:
|
||||
if (Creature* factionNPC = ObjectAccessor::GetCreature(*me, _factionNPC))
|
||||
{
|
||||
factionNPC->GetMotionMaster()->MovePath(factionNPC->GetSpawnId() * 10, false);
|
||||
factionNPC->GetMotionMaster()->MoveWaypoint(factionNPC->GetSpawnId() * 10, false);
|
||||
factionNPC->DespawnOrUnsummon(46500ms);
|
||||
std::list<Creature*> followers;
|
||||
factionNPC->GetCreaturesWithEntryInRange(followers, 30, _instance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? NPC_KOR_KRON_GENERAL : NPC_ALLIANCE_COMMANDER);
|
||||
|
||||
@@ -1742,7 +1742,7 @@ public:
|
||||
{
|
||||
sindragosa->setActive(true);
|
||||
sindragosa->SetDisableGravity(true);
|
||||
sindragosa->GetMotionMaster()->MovePath(NPC_SINDRAGOSA * 10, true);
|
||||
sindragosa->GetMotionMaster()->MoveWaypoint(NPC_SINDRAGOSA * 10, true);
|
||||
|
||||
if (TempSummon* summon = sindragosa->ToTempSummon())
|
||||
{
|
||||
|
||||
@@ -1416,7 +1416,7 @@ public:
|
||||
_startTimer -= diff;
|
||||
if (_startTimer <= 0)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(3000000 + urand(0, 11), true);
|
||||
me->GetMotionMaster()->MoveWaypoint(3000000 + urand(0, 11), true);
|
||||
_startTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,17 +354,7 @@ public:
|
||||
{
|
||||
me->StopMoving();
|
||||
startPath = false;
|
||||
if (WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath()))
|
||||
{
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
}
|
||||
me->GetMotionMaster()->MovePath(me->GetWaypointPath(), FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
|
||||
@@ -139,7 +139,7 @@ struct npc_enslaved_proto_drake : public ScriptedAI
|
||||
_setData = true;
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
me->GetMotionMaster()->MovePath(PATH_PROTODRAKE, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_PROTODRAKE, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1688,7 +1688,7 @@ public:
|
||||
// Arthas load path
|
||||
if (Creature* arthas = ObjectAccessor::GetCreature(*me, _arthasGUID))
|
||||
{
|
||||
arthas->GetMotionMaster()->MovePath(PATH_ARTHAS, false);
|
||||
arthas->GetMotionMaster()->MoveWaypoint(PATH_ARTHAS, false);
|
||||
}
|
||||
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_3, 1s);
|
||||
break;
|
||||
@@ -1696,7 +1696,7 @@ public:
|
||||
// Talbot load path
|
||||
if (Creature* talbot = ObjectAccessor::GetCreature(*me, _talbotGUID))
|
||||
{
|
||||
talbot->GetMotionMaster()->MovePath(PATH_TALBOT, false);
|
||||
talbot->GetMotionMaster()->MoveWaypoint(PATH_TALBOT, false);
|
||||
}
|
||||
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_4, 20s);
|
||||
break;
|
||||
@@ -1730,7 +1730,7 @@ public:
|
||||
arlos->SetWalk(true);
|
||||
arlos->SetImmuneToAll(true);
|
||||
arlos->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
arlos->GetMotionMaster()->MovePath(PATH_ARLOS, false);
|
||||
arlos->GetMotionMaster()->MoveWaypoint(PATH_ARLOS, false);
|
||||
}
|
||||
if (Creature* leryssa = me->SummonCreature(NPC_LERYSSA, 3751.0986f, 3614.9219f, 473.4048f, 4.5029f, TEMPSUMMON_CORPSE_TIMED_DESPAWN))
|
||||
{
|
||||
@@ -1738,7 +1738,7 @@ public:
|
||||
leryssa->SetWalk(true);
|
||||
leryssa->SetImmuneToAll(true);
|
||||
leryssa->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
leryssa->GetMotionMaster()->MovePath(PATH_LERYSSA, false);
|
||||
leryssa->GetMotionMaster()->MoveWaypoint(PATH_LERYSSA, false);
|
||||
}
|
||||
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_7, 7s);
|
||||
break;
|
||||
@@ -1993,7 +1993,7 @@ public:
|
||||
_playerGUID = player->GetGUID();
|
||||
CloseGossipMenuFor(player);
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->GetMotionMaster()->MovePath(PATH_THASSARIAN, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_THASSARIAN, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,25 +41,7 @@ struct npc_preparations_for_war_vehicle : public NullCreatureAI
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
WPPath* path = sSmartWaypointMgr->GetPath(me->GetEntry());
|
||||
if (!path || path->empty())
|
||||
{
|
||||
me->DespawnOrUnsummon(1ms);
|
||||
return;
|
||||
}
|
||||
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
|
||||
uint32 wpCounter = 1;
|
||||
WPPath::const_iterator itr;
|
||||
while ((itr = path->find(wpCounter++)) != path->end())
|
||||
{
|
||||
WayPoint* wp = itr->second;
|
||||
pathPoints.push_back(G3D::Vector3(wp->x, wp->y, wp->z));
|
||||
}
|
||||
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry(), FORCED_MOVEMENT_NONE, PathSource::SMART_WAYPOINT_MGR);
|
||||
|
||||
NullCreatureAI::InitializeAI();
|
||||
pointId = 0;
|
||||
|
||||
@@ -614,7 +614,7 @@ public:
|
||||
uint32 path = me->GetEntry() * 10 + urand(0, 4);
|
||||
if (me->GetPositionY() > -1150.0f)
|
||||
path += 5;
|
||||
me->GetMotionMaster()->MovePath(path, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(path, false);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 point) override
|
||||
|
||||
@@ -589,77 +589,77 @@ public:
|
||||
case EVENT_WOUNDED_MOVE:
|
||||
if (me->GetPositionY() == -2835.11f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
|
||||
me->DespawnOrUnsummon(20s);
|
||||
}
|
||||
if (me->GetPositionY() == -2981.89f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
|
||||
me->DespawnOrUnsummon(18s);
|
||||
}
|
||||
if (me->GetPositionY() == -2934.44f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
|
||||
me->DespawnOrUnsummon(9s);
|
||||
}
|
||||
if (me->GetPositionY() == -3020.99f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
|
||||
me->DespawnOrUnsummon(22s);
|
||||
}
|
||||
if (me->GetPositionY() == -2964.73f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_2, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_2, false);
|
||||
me->DespawnOrUnsummon(15s);
|
||||
}
|
||||
if (me->GetPositionY() == -2940.50f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
|
||||
me->DespawnOrUnsummon(20s);
|
||||
}
|
||||
if (me->GetPositionY() == -2847.93f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
|
||||
me->DespawnOrUnsummon(30s);
|
||||
}
|
||||
if (me->GetPositionY() == -2835.31f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
|
||||
me->DespawnOrUnsummon(27s);
|
||||
}
|
||||
if (me->GetPositionY() == -2822.20f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
|
||||
me->DespawnOrUnsummon(25s);
|
||||
}
|
||||
if (me->GetPositionY() == -2846.31f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
|
||||
me->DespawnOrUnsummon(21s);
|
||||
}
|
||||
if (me->GetPositionY() == -2897.23f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
|
||||
me->DespawnOrUnsummon(15s);
|
||||
}
|
||||
if (me->GetPositionY() == -2886.01f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
|
||||
me->DespawnOrUnsummon(25s);
|
||||
}
|
||||
if (me->GetPositionY() == -2906.89f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
|
||||
me->DespawnOrUnsummon(25s);
|
||||
}
|
||||
if (me->GetPositionY() == -3048.94f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_2, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_2, false);
|
||||
me->DespawnOrUnsummon(30s);
|
||||
}
|
||||
if (me->GetPositionY() == -2961.08f)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_2, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_2, false);
|
||||
me->DespawnOrUnsummon(25s);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1312,25 +1312,7 @@ public:
|
||||
break;
|
||||
case EVENT_START_FLIGHT:
|
||||
{
|
||||
WPPath* path = sSmartWaypointMgr->GetPath(me->GetEntry());
|
||||
if (!path || path->empty())
|
||||
{
|
||||
me->DespawnOrUnsummon(1ms);
|
||||
return;
|
||||
}
|
||||
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
|
||||
uint32 wpCounter = 1;
|
||||
WPPath::const_iterator itr;
|
||||
while ((itr = path->find(wpCounter++)) != path->end())
|
||||
{
|
||||
WayPoint* wp = itr->second;
|
||||
pathPoints.push_back(G3D::Vector3(wp->x, wp->y, wp->z));
|
||||
}
|
||||
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry(), FORCED_MOVEMENT_NONE, PathSource::SMART_WAYPOINT_MGR);
|
||||
events.ScheduleEvent(EVENT_CHECK_PATH_REGEN_HEALTH_BURN_DAMAGE, 1min);
|
||||
events.ScheduleEvent(EVENT_SYNCHRONIZE_SHIELDS, 5s);
|
||||
break;
|
||||
|
||||
@@ -1148,17 +1148,7 @@ public:
|
||||
{
|
||||
if (apply && passenger->IsPlayer())
|
||||
{
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
|
||||
WaypointPath const* i_path = sWaypointMgr->GetPath(NPC_PLANE);
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
me->GetMotionMaster()->MovePath(NPC_PLANE, FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -467,17 +467,7 @@ public:
|
||||
if (startPath)
|
||||
{
|
||||
startPath = false;
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
|
||||
WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath());
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
me->GetMotionMaster()->MovePath(me->GetWaypointPath(), FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
|
||||
}
|
||||
if (setCharm)
|
||||
{
|
||||
@@ -849,17 +839,7 @@ public:
|
||||
{
|
||||
Talk(TEXT_EMOTE, passenger);
|
||||
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
|
||||
WaypointPath const* i_path = sWaypointMgr->GetPath(NPC_DRAKE);
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
me->GetMotionMaster()->MovePath(NPC_DRAKE, FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1087,15 +1067,7 @@ public:
|
||||
{
|
||||
if (apply)
|
||||
{
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetEntry() * 100);
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 100, FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetSpeed(MOVE_RUN, 6.0f);
|
||||
|
||||
@@ -66,7 +66,7 @@ struct boss_ambassador_hellmaw : public BossAI
|
||||
}
|
||||
else
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(PATH_ID_START, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_ID_START, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ struct boss_ambassador_hellmaw : public BossAI
|
||||
DoPlaySoundToSet(me, SOUND_INTRO);
|
||||
isBanished = false;
|
||||
me->SetImmuneToAll(false);
|
||||
me->GetMotionMaster()->MovePath(PATH_ID_START, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_ID_START, false);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit*) override
|
||||
@@ -142,7 +142,7 @@ struct boss_ambassador_hellmaw : public BossAI
|
||||
{
|
||||
me->m_Events.AddEventAtOffset([this]()
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(PATH_ID_PATHING, true);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_ID_PATHING, true);
|
||||
}, 20s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -794,7 +794,7 @@ struct npc_akama_illidan : public ScriptedAI
|
||||
|
||||
if (instance->GetBossState(DATA_AKAMA_ILLIDAN) != DONE)
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(PATH_AKAMA_ILLIDARI_COUNCIL_2, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_ILLIDARI_COUNCIL_2, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -811,7 +811,7 @@ struct npc_akama_illidan : public ScriptedAI
|
||||
{
|
||||
me->NearTeleportTo(AkamaIllidariCouncilTeleport);
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->GetMotionMaster()->MovePath(PATH_AKAMA_ILLIDARI_COUNCIL_1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_ILLIDARI_COUNCIL_1, false);
|
||||
}
|
||||
break;
|
||||
case ACTION_AKAMA_MINIONS:
|
||||
@@ -974,7 +974,7 @@ struct npc_akama_illidan : public ScriptedAI
|
||||
Talk(SAY_AKAMA_SALUTE);
|
||||
}, 56955ms); // 6275ms
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
me->GetMotionMaster()->MovePath(PATH_AKAMA_ILLIDARI_COUNCIL_3, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_ILLIDARI_COUNCIL_3, false);
|
||||
}, 64030ms); // 7075ms
|
||||
}
|
||||
break;
|
||||
@@ -1013,7 +1013,7 @@ struct npc_akama_illidan : public ScriptedAI
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
}, 9530ms); // 2830ms
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
me->GetMotionMaster()->MovePath(PATH_AKAMA_MINIONS, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_MINIONS, false);
|
||||
}, 14400ms); // 4870ms
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ struct boss_hydross_the_unstable : public BossAI
|
||||
else if (summon->GetEntry() == NPC_TAINTED_HYDROSS_ELEMENTAL)
|
||||
{
|
||||
summon->setActive(true);
|
||||
summon->GetMotionMaster()->MovePath(summon->GetEntry() * 10, false);
|
||||
summon->GetMotionMaster()->MoveWaypoint(summon->GetEntry() * 10, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
{
|
||||
if (Creature* quagmirran = instance->GetCreature(DATA_QUAGMIRRAN))
|
||||
{
|
||||
quagmirran->GetMotionMaster()->MovePath(quagmirran->GetEntry() * 100, true);
|
||||
quagmirran->GetMotionMaster()->MoveWaypoint(quagmirran->GetEntry() * 100, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ struct boss_ghazan : public BossAI
|
||||
if (type == ACTION_MOVE_TO_PLATFORM && !_movedToPlatform)
|
||||
{
|
||||
_movedToPlatform = true;
|
||||
me->GetMotionMaster()->MovePath((me->GetSpawnId() * 10) + 1, false);
|
||||
me->GetMotionMaster()->MoveWaypoint((me->GetSpawnId() * 10) + 1, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ struct npc_shattered_hand_scout : public ScriptedAI
|
||||
DoCastSelf(SPELL_CLEAR_ALL);
|
||||
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
Talk(SAY_INVADERS_BREACHED);
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
|
||||
|
||||
_firstZealots.clear();
|
||||
std::list<Creature*> creatureList;
|
||||
|
||||
@@ -355,17 +355,7 @@ struct boss_alar : public BossAI
|
||||
void ConstructWaypointsAndMove()
|
||||
{
|
||||
me->StopMoving();
|
||||
if (WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath()))
|
||||
{
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
}
|
||||
me->GetMotionMaster()->MovePath(me->GetWaypointPath(), FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -1860,22 +1860,22 @@ struct dragonmaw_race_npc : public ScriptedAI
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_MUCKJAW:
|
||||
me->GetMotionMaster()->MovePath(PATH_MUCKJAW, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_MUCKJAW, false);
|
||||
break;
|
||||
case NPC_TROPE:
|
||||
me->GetMotionMaster()->MovePath(PATH_TROPE, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_TROPE, false);
|
||||
break;
|
||||
case NPC_CORLOK:
|
||||
me->GetMotionMaster()->MovePath(PATH_CORLOK, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_CORLOK, false);
|
||||
break;
|
||||
case NPC_ICHMAN:
|
||||
me->GetMotionMaster()->MovePath(PATH_ICHMAN, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_ICHMAN, false);
|
||||
break;
|
||||
case NPC_MULVERICK:
|
||||
me->GetMotionMaster()->MovePath(PATH_MULVERICK, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_MULVERICK, false);
|
||||
break;
|
||||
case NPC_SKYSHATTER:
|
||||
me->GetMotionMaster()->MovePath(PATH_SKYSHATTER, false);
|
||||
me->GetMotionMaster()->MoveWaypoint(PATH_SKYSHATTER, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user