mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 16:56:07 +00:00
fix(Core/Unit): rework Walk/Run mode (#22988)
Co-authored-by: sudlud <sudlud@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -359,7 +359,7 @@ public:
|
||||
case 0:
|
||||
Talk(SAY_TEXT5);
|
||||
HandleGameObject(DATA_ARENA4, false);
|
||||
Start(false, false);
|
||||
Start(false);
|
||||
eventTimer = 0;
|
||||
break;
|
||||
case 1:
|
||||
@@ -604,7 +604,7 @@ public:
|
||||
creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false);
|
||||
|
||||
if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI()))
|
||||
escortAI->Start(false, false);
|
||||
escortAI->Start(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,9 @@ struct boss_quartermaster_zigris : public BossAI
|
||||
{
|
||||
if (me->IsWithinMeleeRange(me->GetVictim()))
|
||||
{
|
||||
me->GetMotionMaster()->MoveBackwards(me->GetVictim(), 10.0f);
|
||||
float x, y, z;
|
||||
me->GetNearPoint(me->GetVictim(), x, y, z, me->GetVictim()->GetBoundaryRadius(), 10.0f, me->GetAngle(me->GetVictim()));
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_RUN); // TODO: Implement generic distancing on npc on target root
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ public:
|
||||
Talk(SAY_RAG_SUM_2);
|
||||
// Next event will get triggered in MovementInform
|
||||
me->SetWalk(true);
|
||||
me->GetMotionMaster()->MovePoint(POINT_RAGNAROS_SUMMON, MajordomoMoveRagPos, true, false);
|
||||
me->GetMotionMaster()->MovePoint(POINT_RAGNAROS_SUMMON, MajordomoMoveRagPos, FORCED_MOVEMENT_NONE, 0.f, true, false);
|
||||
break;
|
||||
}
|
||||
case EVENT_RAGNAROS_SUMMON_2:
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
if (m_uiEventId == EVENT_OZ)
|
||||
instance->SetData(DATA_OPERA_OZ_DEATHCOUNT, IN_PROGRESS);
|
||||
|
||||
Start(false, false);
|
||||
Start(false);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
|
||||
@@ -980,7 +980,7 @@ public:
|
||||
{
|
||||
carGUID = who->GetVehicleBase()->GetGUID();
|
||||
InitWaypoint();
|
||||
Start(false, false, who->GetGUID());
|
||||
Start(false, who->GetGUID());
|
||||
SetDespawnAtFar(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -660,14 +660,14 @@ public:
|
||||
{
|
||||
Position pos = LightOfDawnPos[first];
|
||||
summon->SetHomePosition(pos);
|
||||
summon->GetMotionMaster()->MovePoint(1, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, false);
|
||||
summon->GetMotionMaster()->MovePoint(1, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, true, false);
|
||||
}
|
||||
first = first == 0 ? 1 : 0;
|
||||
}
|
||||
Position pos = LightOfDawnPos[first];
|
||||
me->SetHomePosition(pos);
|
||||
me->SetWalk(false);
|
||||
me->GetMotionMaster()->MovePoint(1, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, true);
|
||||
me->GetMotionMaster()->MovePoint(1, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, true, true);
|
||||
DoCastSelf(SPELL_THE_MIGHT_OF_MOGRAINE, true);
|
||||
break;
|
||||
}
|
||||
@@ -691,7 +691,7 @@ public:
|
||||
{
|
||||
orbaz->SetReactState(REACT_PASSIVE);
|
||||
orbaz->AI()->Talk(EMOTE_LIGHT_OF_DAWN04);
|
||||
orbaz->GetMotionMaster()->MovePoint(2, LightOfDawnPos[2], true, true);
|
||||
orbaz->GetMotionMaster()->MovePoint(2, LightOfDawnPos[2], FORCED_MOVEMENT_NONE, 0.f, true, true);
|
||||
orbaz->DespawnOrUnsummon(7s);
|
||||
}
|
||||
|
||||
@@ -1061,7 +1061,7 @@ public:
|
||||
if (Creature* tirion = GetEntryFromSummons(NPC_HIGHLORD_TIRION_FORDRING))
|
||||
{
|
||||
float o = me->GetAngle(tirion);
|
||||
tirion->GetMotionMaster()->MovePoint(4, me->GetPositionX() + 2.0f * cos(o), me->GetPositionY() + 2.0f * std::sin(o), me->GetPositionZ(), false);
|
||||
tirion->GetMotionMaster()->MovePoint(4, me->GetPositionX() + 2.0f * cos(o), me->GetPositionY() + 2.0f * std::sin(o), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
|
||||
tirion->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
tirion->SetFaction(FACTION_FRIENDLY);
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ struct npc_madrigosa : public NullCreatureAI
|
||||
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
|
||||
{
|
||||
brutallus->SetDisableGravity(true);
|
||||
brutallus->GetMotionMaster()->MovePoint(0, brutallus->GetPositionX(), brutallus->GetPositionY() - 30.0f, brutallus->GetPositionZ() + 15.0f, false, true);
|
||||
brutallus->GetMotionMaster()->MovePoint(0, brutallus->GetPositionX(), brutallus->GetPositionY() - 30.0f, brutallus->GetPositionZ() + 15.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, true);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_MAD_15, 10s);
|
||||
break;
|
||||
|
||||
@@ -205,7 +205,7 @@ struct boss_felmyst : public BossAI
|
||||
|
||||
// Summon Kalecgos (human form of kalecgos fight)
|
||||
if (Creature* kalec = me->SummonCreature(NPC_KALECGOS_FELMYST, 1573.1461f, 755.20245f, 99.524956f, 3.595378f))
|
||||
kalec->GetMotionMaster()->MovePoint(POINT_KALECGOS, 1474.2347f, 624.0703f, 29.32589f, false, true);
|
||||
kalec->GetMotionMaster()->MovePoint(POINT_KALECGOS, 1474.2347f, 624.0703f, 29.32589f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, true);
|
||||
}
|
||||
|
||||
void ScheduleGroundAbilities()
|
||||
@@ -312,9 +312,9 @@ struct boss_felmyst : public BossAI
|
||||
++_strafeCount;
|
||||
_currentLane = urand(0, 2);
|
||||
if (isRightSide)
|
||||
me->GetMotionMaster()->MovePoint(POINT_LANE, RightSideLanes[_currentLane], false);
|
||||
me->GetMotionMaster()->MovePoint(POINT_LANE, RightSideLanes[_currentLane], FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
else
|
||||
me->GetMotionMaster()->MovePoint(POINT_LANE, LeftSideLanes[_currentLane], false);
|
||||
me->GetMotionMaster()->MovePoint(POINT_LANE, LeftSideLanes[_currentLane], FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
}, 5s);
|
||||
break;
|
||||
case POINT_LANE:
|
||||
@@ -328,9 +328,9 @@ struct boss_felmyst : public BossAI
|
||||
DoCastSelf(SPELL_FELMYST_SPEED_BURST, true);
|
||||
|
||||
if (me->FindNearestCreature(NPC_WORLD_TRIGGER_RIGHT, 30.0f))
|
||||
me->GetMotionMaster()->MovePoint(POINT_AIR_BREATH_END, LeftSideLanes[_currentLane], false);
|
||||
me->GetMotionMaster()->MovePoint(POINT_AIR_BREATH_END, LeftSideLanes[_currentLane], FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
else
|
||||
me->GetMotionMaster()->MovePoint(POINT_AIR_BREATH_END, RightSideLanes[_currentLane], false);
|
||||
me->GetMotionMaster()->MovePoint(POINT_AIR_BREATH_END, RightSideLanes[_currentLane], FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
}, 5s);
|
||||
break;
|
||||
case POINT_AIR_BREATH_END:
|
||||
@@ -338,9 +338,9 @@ struct boss_felmyst : public BossAI
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
if (me->FindNearestCreature(NPC_WORLD_TRIGGER_RIGHT, 30.0f))
|
||||
me->GetMotionMaster()->MovePoint(POINT_AIR_UP, RightSide, false);
|
||||
me->GetMotionMaster()->MovePoint(POINT_AIR_UP, RightSide, FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
else
|
||||
me->GetMotionMaster()->MovePoint(POINT_AIR_UP, LeftSide, false);
|
||||
me->GetMotionMaster()->MovePoint(POINT_AIR_UP, LeftSide, FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
}, 2s);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -729,25 +729,18 @@ struct npc_kalecgos_kj : public NullCreatureAI
|
||||
if (summon->GetEntry() == NPC_SHATTERED_SUN_RIFTWAKER)
|
||||
{
|
||||
summon->CastSpell(summon, SPELL_TELEPORT_VISUAL, true);
|
||||
Movement::MoveSplineInit init(summon);
|
||||
|
||||
if (summons.size() == 1)
|
||||
{
|
||||
init.MoveTo(1727.08f, 656.82f, 28.37f, false, true);
|
||||
init.SetFacing(5.14f);
|
||||
}
|
||||
summon->GetMotionMaster()->MovePoint(0, 1727.08f, 656.82f, 28.37f, FORCED_MOVEMENT_NONE, 0.f, 5.14f, false, true);
|
||||
else
|
||||
{
|
||||
init.MoveTo(1738.84f, 627.32f, 28.26f, false, true);
|
||||
init.SetFacing(2.0f);
|
||||
}
|
||||
init.Launch();
|
||||
summon->GetMotionMaster()->MovePoint(0, 1738.84f, 627.32f, 28.26f, FORCED_MOVEMENT_NONE, 0.f, 2.0f, false, true);
|
||||
}
|
||||
else if (summon->GetEntry() == NPC_SHATTRATH_PORTAL_DUMMY)
|
||||
{
|
||||
if (Creature* riftwaker = summon->FindNearestCreature(NPC_SHATTERED_SUN_RIFTWAKER, 10.0f))
|
||||
riftwaker->CastSpell(summon, SPELL_OPEN_PORTAL_FROM_SHATTRATH, false);
|
||||
summon->SetWalk(true);
|
||||
summon->GetMotionMaster()->MovePoint(0, summon->GetPositionX(), summon->GetPositionY(), summon->GetPositionZ() + 30.0f, false, true);
|
||||
summon->GetMotionMaster()->MovePoint(0, summon->GetPositionX(), summon->GetPositionY(), summon->GetPositionZ() + 30.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, true);
|
||||
}
|
||||
else if (summon->GetEntry() == NPC_INERT_PORTAL)
|
||||
summon->CastSpell(summon, SPELL_BOSS_ARCANE_PORTAL_STATE, true);
|
||||
@@ -762,7 +755,7 @@ struct npc_kalecgos_kj : public NullCreatureAI
|
||||
{
|
||||
summon->CastSpell(summon, SPELL_TELEPORT_VISUAL, true);
|
||||
summon->SetWalk(true);
|
||||
summon->GetMotionMaster()->MovePoint(0, 1710.15f, 639.23f, 27.311f, false, true);
|
||||
summon->GetMotionMaster()->MovePoint(0, 1710.15f, 639.23f, 27.311f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, true);
|
||||
}
|
||||
else if (summon->GetEntry() == NPC_THE_CORE_OF_ENTROPIUS)
|
||||
summon->GetMotionMaster()->MovePoint(0, summon->GetPositionX(), summon->GetPositionY(), 30.0f);
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
break;
|
||||
case 11:
|
||||
Talk(SAY_PROGRESS_6, player);
|
||||
SetRun();
|
||||
SetRun(true);
|
||||
break;
|
||||
case 19:
|
||||
Talk(SAY_PROGRESS_7, player);
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE)
|
||||
{
|
||||
Talk(SAY_PROGRESS_1, player);
|
||||
npc_escortAI::Start(false, false, player->GetGUID(), quest);
|
||||
npc_escortAI::Start(false, player->GetGUID(), quest);
|
||||
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,11 +112,11 @@ struct npc_cameron : public ScriptedAI
|
||||
if (Creature* children = ObjectAccessor::GetCreature(*me, _childrenGUIDs[i]))
|
||||
{
|
||||
children->SetWalk(true);
|
||||
children->GetMotionMaster()->MovePoint(0, MovePosPositions[i], true, MovePosPositions[i].GetOrientation());
|
||||
children->GetMotionMaster()->MovePoint(0, MovePosPositions[i]);
|
||||
}
|
||||
}
|
||||
me->SetWalk(true);
|
||||
me->GetMotionMaster()->MovePoint(0, MovePosPositions.back(), true, MovePosPositions.back().GetOrientation());
|
||||
me->GetMotionMaster()->MovePoint(0, MovePosPositions.back());
|
||||
}
|
||||
|
||||
void PathEndReached(uint32 pathId) override
|
||||
|
||||
@@ -113,7 +113,7 @@ struct npc_ranger_lilatha : public npc_escortAI
|
||||
if (quest->GetQuestId() == QUEST_ESCAPE_FROM_THE_CATACOMBS)
|
||||
{
|
||||
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
|
||||
npc_escortAI::Start(true, false, player->GetGUID());
|
||||
npc_escortAI::Start(true, player->GetGUID());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
if (GameObject* go = me->FindNearestGameObject(GO_RINJI_CAGE, INTERACTION_DISTANCE))
|
||||
go->UseDoorOrButton();
|
||||
|
||||
npc_escortAI::Start(false, false, player->GetGUID(), quest);
|
||||
npc_escortAI::Start(false, player->GetGUID(), quest);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
case 17:
|
||||
Talk(SAY_RIN_COMPLETE, player);
|
||||
player->GroupEventHappens(QUEST_RINJI_TRAPPED, me);
|
||||
SetRun();
|
||||
SetRun(true);
|
||||
postEventCount = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
if (quest->GetQuestId() == QUEST_MISSING_IN_ACTION)
|
||||
{
|
||||
Talk(SAY_CORPORAL_1, player);
|
||||
npc_escortAI::Start(true, false, player->GetGUID(), quest);
|
||||
npc_escortAI::Start(true, player->GetGUID(), quest);
|
||||
me->SetImmuneToNPC(false);
|
||||
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
creature->AI()->Talk(SAY_QUESTACCEPT, player);
|
||||
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_deathstalker_erland::npc_deathstalker_erlandAI, creature->AI()))
|
||||
pEscortAI->Start(true, false, player->GetGUID());
|
||||
pEscortAI->Start(true, player->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -406,7 +406,7 @@ public:
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pLescovar->AI())->Start(false, false, player->GetGUID());
|
||||
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pLescovar->AI())->Start(false, player->GetGUID());
|
||||
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pLescovar->AI())->SetMaxPlayerDistance(200.0f);
|
||||
}
|
||||
}
|
||||
@@ -448,7 +448,7 @@ public:
|
||||
{
|
||||
if (Creature* pSpybot = creature->FindNearestCreature(NPC_TYRION_SPYBOT, 5.0f, true))
|
||||
{
|
||||
CAST_AI(npc_tyrion_spybot::npc_tyrion_spybotAI, pSpybot->AI())->Start(false, false, player->GetGUID());
|
||||
CAST_AI(npc_tyrion_spybot::npc_tyrion_spybotAI, pSpybot->AI())->Start(false, player->GetGUID());
|
||||
CAST_AI(npc_tyrion_spybot::npc_tyrion_spybotAI, pSpybot->AI())->SetMaxPlayerDistance(200.0f);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
{
|
||||
summoned->SetDisableGravity(true);
|
||||
float speed = summoned->GetDistance(summoned->GetPositionX(), summoned->GetPositionY(), me->GetPositionZ() + 15.0f) / (1000.0f * 0.001f);
|
||||
summoned->MonsterMoveWithSpeed(summoned->GetPositionX(), summoned->GetPositionY(), me->GetPositionZ() + 15.0f, speed);
|
||||
summoned->GetMotionMaster()->MovePoint(0, summoned->GetPositionX(), summoned->GetPositionY(), me->GetPositionZ() + 15.0f, FORCED_MOVEMENT_NONE, speed);
|
||||
summoned->CastSpell(summoned, SPELL_RIBBON_OF_SOULS, false);
|
||||
}
|
||||
}
|
||||
@@ -270,8 +270,7 @@ public:
|
||||
if (EventMoveTimer <= diff)
|
||||
{
|
||||
me->SetDisableGravity(true);
|
||||
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetDistance(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW) / (5000 * 0.001f));
|
||||
me->SetPosition(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetOrientation());
|
||||
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, FORCED_MOVEMENT_NONE, me->GetDistance(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW) / (5000 * 0.001f));
|
||||
EventMove = false;
|
||||
}
|
||||
else EventMoveTimer -= diff;
|
||||
@@ -917,7 +916,8 @@ public:
|
||||
|
||||
if (auto ai = CAST_AI(npc_varian_wrynn::npc_varian_wrynnAI, creature->AI()))
|
||||
{
|
||||
ai->Start(true, true, player->GetGUID());
|
||||
creature->SetWalk(false);
|
||||
ai->Start(true, player->GetGUID());
|
||||
if (Creature* jaina = GetClosestCreatureWithEntry(creature, NPC_JAINA, 50.0f))
|
||||
ai->jainaGUID = jaina->GetGUID();
|
||||
else
|
||||
@@ -1218,27 +1218,27 @@ public:
|
||||
{
|
||||
case 0:
|
||||
if (Unit* temp = me->SummonCreature(NPC_DOCTOR, AllianceSpawn[4].x - rand32() % 5, AllianceSpawn[4].y - rand32() % 5, AllianceSpawn[4].z, TEMPSUMMON_DEAD_DESPAWN))
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
|
||||
break;
|
||||
case 1:
|
||||
if (Unit* temp = me->SummonCreature(NPC_CHEMIST, AllianceSpawn[4].x - rand32() % 5, AllianceSpawn[4].y - rand32() % 5, AllianceSpawn[4].z, TEMPSUMMON_DEAD_DESPAWN))
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
|
||||
break;
|
||||
case 2:
|
||||
if (Unit* temp = me->SummonCreature(NPC_BETRAYER, AllianceSpawn[4].x - rand32() % 5, AllianceSpawn[4].y - rand32() % 5, AllianceSpawn[4].z, TEMPSUMMON_DEAD_DESPAWN))
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
|
||||
break;
|
||||
case 3:
|
||||
if (Unit* temp = me->SummonCreature(NPC_DOCTOR, AllianceSpawn[5].x - rand32() % 5, AllianceSpawn[5].y - rand32() % 5, AllianceSpawn[5].z, TEMPSUMMON_DEAD_DESPAWN))
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
|
||||
break;
|
||||
case 4:
|
||||
if (Unit* temp = me->SummonCreature(NPC_CHEMIST, AllianceSpawn[5].x - rand32() % 5, AllianceSpawn[5].y - rand32() % 5, AllianceSpawn[5].z, TEMPSUMMON_DEAD_DESPAWN))
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
|
||||
break;
|
||||
case 5:
|
||||
if (Unit* temp = me->SummonCreature(NPC_BETRAYER, AllianceSpawn[5].x - rand32() % 5, AllianceSpawn[5].y - rand32() % 5, AllianceSpawn[5].z, TEMPSUMMON_DEAD_DESPAWN))
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1246,7 +1246,7 @@ public:
|
||||
case 5:
|
||||
for (uint8 i = 0; i < WAVE_MAXCOUNT; ++i)
|
||||
if (Unit* temp = me->SummonCreature(NPC_GUARDIAN, AllianceSpawn[6].x - rand32() % 5, AllianceSpawn[6].y - rand32() % 5, AllianceSpawn[6].z, TEMPSUMMON_DEAD_DESPAWN))
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
|
||||
temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
|
||||
break;
|
||||
case 6:
|
||||
if (Unit* temp = me->SummonCreature(NPC_BLIGHTWORM, AllianceSpawn[7].x, AllianceSpawn[7].y, AllianceSpawn[7].z, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
@@ -1614,7 +1614,7 @@ public:
|
||||
break;
|
||||
case 22:
|
||||
Talk(WRYNN_SAY_SEWERS_4);
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
|
||||
{
|
||||
jaina->GetMotionMaster()->Clear();
|
||||
@@ -1665,7 +1665,7 @@ public:
|
||||
JumpToNextStep(3 * IN_MILLISECONDS);
|
||||
break;
|
||||
case 31:
|
||||
SetRun(true);
|
||||
me->SetWalk(false);
|
||||
if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
|
||||
jaina->GetMotionMaster()->MoveFollow(me, 1, 0);
|
||||
SetEscortPaused(false);
|
||||
@@ -1727,7 +1727,7 @@ public:
|
||||
if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
|
||||
{
|
||||
jaina->GetMotionMaster()->Clear();
|
||||
jaina->GetMotionMaster()->MovePoint(0, AllianceWP[7].x, AllianceWP[7].y, AllianceWP[7].z, false);
|
||||
jaina->GetMotionMaster()->MovePoint(0, AllianceWP[7].x, AllianceWP[7].y, AllianceWP[7].z, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
|
||||
}
|
||||
JumpToNextStep(5 * IN_MILLISECONDS);
|
||||
break;
|
||||
@@ -1789,7 +1789,7 @@ public:
|
||||
break;
|
||||
case 54:
|
||||
Talk(WRYNN_SAY_APO_7);
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
JumpToNextStep(4 * IN_MILLISECONDS);
|
||||
break;
|
||||
case 55:
|
||||
@@ -1845,7 +1845,7 @@ public:
|
||||
JumpToNextStep(1.5 * IN_MILLISECONDS);
|
||||
break;
|
||||
case 65:
|
||||
SetRun(true);
|
||||
me->SetWalk(false);
|
||||
SetEscortPaused(false);
|
||||
JumpToNextStep(0.25 * IN_MILLISECONDS);
|
||||
break;
|
||||
@@ -2236,7 +2236,8 @@ public:
|
||||
if (Creature* sylvannas = GetClosestCreatureWithEntry(creature, NPC_SYLVANAS, 50.0f))
|
||||
{
|
||||
thrall_ai->sylvanasfollowGUID = sylvannas->GetGUID();
|
||||
thrall_ai->Start(true, true, player->GetGUID());
|
||||
creature->SetWalk(false);
|
||||
thrall_ai->Start(true, player->GetGUID());
|
||||
thrall_ai->SetDespawnAtEnd(false);
|
||||
thrall_ai->SetDespawnAtFar(false);
|
||||
}
|
||||
@@ -2477,7 +2478,7 @@ public:
|
||||
for (std::list<Creature*>::iterator itr = ThroneList.begin(); itr != ThroneList.end(); itr++)
|
||||
(*itr)->DespawnOrUnsummon();
|
||||
SetEscortPaused(false);
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -2972,7 +2973,7 @@ public:
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
JumpToNextStep(0);
|
||||
SetRun(true);
|
||||
me->SetWalk(false);
|
||||
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasfollowGUID))
|
||||
{
|
||||
sylvanas->GetMotionMaster()->MovePath(NPC_SYLVANAS * 100, false);
|
||||
@@ -3005,7 +3006,7 @@ public:
|
||||
for (std::list<Creature*>::iterator itr = PlagueList.begin(); itr != PlagueList.end(); itr++)
|
||||
(*itr)->DespawnOrUnsummon();
|
||||
SetEscortPaused(false);
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasfollowGUID))
|
||||
sylvanas->GetMotionMaster()->MovePath(NPC_SYLVANAS * 1000, false);
|
||||
JumpToNextStep(3 * IN_MILLISECONDS);
|
||||
@@ -3077,7 +3078,7 @@ public:
|
||||
FollowThrall();
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
SetRun(true);
|
||||
me->SetWalk(false);
|
||||
Talk(THRALL_SAY_COURTYARD_4);
|
||||
UpdateWorldState(me->GetMap(), WORLD_STATE_BATTLE_FOR_UNDERCITY_START_H, 0);
|
||||
UpdateWorldState(me->GetMap(), WORLD_STATE_BATTLE_FOR_UNDERCITY_COURTYARD_FIGHT_H, 1);
|
||||
@@ -3182,7 +3183,7 @@ public:
|
||||
SpawnWave(6);
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
JumpToNextStep(0 * IN_MILLISECONDS);
|
||||
break;
|
||||
}
|
||||
@@ -3226,7 +3227,7 @@ public:
|
||||
FollowThrall();
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
JumpToNextStep(0 * IN_MILLISECONDS);
|
||||
break;
|
||||
// Top of Undercity Discussion
|
||||
@@ -3266,7 +3267,7 @@ public:
|
||||
FollowThrall();
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
JumpToNextStep(0 * IN_MILLISECONDS);
|
||||
break;
|
||||
case 63:
|
||||
@@ -3284,7 +3285,7 @@ public:
|
||||
FollowThrall();
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
JumpToNextStep(0 * IN_MILLISECONDS);
|
||||
break;
|
||||
case 67:
|
||||
@@ -3299,7 +3300,7 @@ public:
|
||||
FollowThrall();
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
JumpToNextStep(0 * IN_MILLISECONDS);
|
||||
break;
|
||||
// KHANOK - Valimathtas Intro
|
||||
@@ -3475,7 +3476,7 @@ public:
|
||||
FollowThrall();
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
JumpToNextStep(0 * IN_MILLISECONDS);
|
||||
break;
|
||||
case 109:
|
||||
@@ -3491,7 +3492,7 @@ public:
|
||||
FollowThrall();
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
SetRun(true);
|
||||
me->SetWalk(false);
|
||||
JumpToNextStep(0 * IN_MILLISECONDS);
|
||||
break;
|
||||
case 112:
|
||||
@@ -3662,7 +3663,7 @@ public:
|
||||
case 143:
|
||||
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasfollowGUID))
|
||||
{
|
||||
sylvanas->GetMotionMaster()->MovePoint(0, 1289.48f, 314.33f, -57.32f, true);
|
||||
sylvanas->GetMotionMaster()->MovePoint(0, 1289.48f, 314.33f, -57.32f);
|
||||
sylvanas->CastSpell(sylvanas, SPELL_LEAP_TO_PLATFORM);
|
||||
}
|
||||
JumpToNextStep(10 * IN_MILLISECONDS);
|
||||
@@ -3706,7 +3707,7 @@ public:
|
||||
wrynn->SetImmuneToAll(true);
|
||||
wrynn->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
|
||||
wrynn->SetReactState(REACT_PASSIVE);
|
||||
wrynn->GetMotionMaster()->MovePoint(0, 1302.543f, 359.472f, -67.295f, true);
|
||||
wrynn->GetMotionMaster()->MovePoint(0, 1302.543f, 359.472f, -67.295f);
|
||||
}
|
||||
if (Creature* jaina = me->SummonCreature(NPC_JAINA, 1308.862f, 381.809f, -66.044243f, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
@@ -3807,7 +3808,7 @@ public:
|
||||
{
|
||||
SaurfangGUID = saurfang->GetGUID();
|
||||
saurfang->SetWalk(true);
|
||||
saurfang->GetMotionMaster()->MovePoint(0, 1300.862f, 353.670f, -66.187f, true);
|
||||
saurfang->GetMotionMaster()->MovePoint(0, 1300.862f, 353.670f, -66.187f);
|
||||
}
|
||||
JumpToNextStep(7 * IN_MILLISECONDS);
|
||||
break;
|
||||
|
||||
@@ -56,9 +56,9 @@ public:
|
||||
if (quest->GetQuestId() == QUEST_TOME_VALOR)
|
||||
{
|
||||
creature->AI()->Talk(SAY_DS_START);
|
||||
|
||||
creature->SetWalk(false);
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_daphne_stilwell::npc_daphne_stilwellAI, creature->AI()))
|
||||
pEscortAI->Start(true, true, player->GetGUID());
|
||||
pEscortAI->Start(true, player->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
case 2:
|
||||
if (me->HasStealthAura())
|
||||
me->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
||||
SetRun();
|
||||
me->SetWalk(false);
|
||||
me->SetFaction(FACTION_ENEMY);
|
||||
break;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
me->GetThreatMgr().ClearAllThreat();
|
||||
me->CombatStop(true);
|
||||
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
pSlim->CastSpell(pSlim, SPELL_STEALTH, true);
|
||||
|
||||
if (npc_tapoke_slim_jahn::npc_tapoke_slim_jahnAI* pEscortAI = CAST_AI(npc_tapoke_slim_jahn::npc_tapoke_slim_jahnAI, pSlim->AI()))
|
||||
pEscortAI->Start(false, false, player->GetGUID(), quest);
|
||||
pEscortAI->Start(false, player->GetGUID(), quest);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user