mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 22:15:15 +00:00
feature(SmartAI/Movement) - Unify waypoint systems (#23251)
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user