mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 14:05:28 +00:00
feature(SmartAI/Movement) - Unify waypoint systems (#23251)
This commit is contained in:
@@ -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