Core/Script: Code style.

WaypointReached(uint32 i) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 uiPointId) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*point*/) -> WaypointReached(uint32 /*waypointId*/)
WaypointReached(uint32 uiI) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*i*/) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 uiWPointId) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*wp*/) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*point*/) -> WaypointReached(uint32 waypointId)

Signed-off-by: Gyx <[email protected]>
This commit is contained in:
Gyx
2012-03-29 15:44:24 +08:00
parent 5b7493fc66
commit 391d68be20
67 changed files with 660 additions and 603 deletions
@@ -177,9 +177,9 @@ public:
MobDeath_Timer = 2500; MobDeath_Timer = 2500;
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
switch (i) switch (waypointId)
{ {
case 0: case 0:
DoScriptText(SCRIPT_TEXT1, me);//2 DoScriptText(SCRIPT_TEXT1, me);//2
@@ -611,7 +611,7 @@ public:
{ {
npc_dughal_stormwingAI(Creature* creature) : npc_escortAI(creature) {} npc_dughal_stormwingAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
switch (i) switch (i)
{ {
@@ -730,7 +730,7 @@ public:
instance = creature->GetInstanceScript(); instance = creature->GetInstanceScript();
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
switch (i) switch (i)
{ {
@@ -900,7 +900,7 @@ public:
{ {
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
wp=i; wp=i;
switch (i) switch (i)
@@ -1105,7 +1105,7 @@ public:
} }
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
switch (i) switch (i)
{ {
@@ -1226,12 +1226,12 @@ public:
go->SetGoState((GOState)state); go->SetGoState((GOState)state);
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (!instance) if (!instance)
return; return;
switch (i) switch (waypointId)
{ {
case 1: case 1:
me->HandleEmoteCommand(EMOTE_ONESHOT_KICK); me->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
@@ -266,14 +266,14 @@ public:
} }
} }
void WaypointReached(uint32 uiPoint) void WaypointReached(uint32 waypointId)
{ {
//just in case //just in case
if (GetPlayerForEscort()) if (GetPlayerForEscort())
if (me->getFaction() != GetPlayerForEscort()->getFaction()) if (me->getFaction() != GetPlayerForEscort()->getFaction())
me->setFaction(GetPlayerForEscort()->getFaction()); me->setFaction(GetPlayerForEscort()->getFaction());
switch (uiPoint) switch (waypointId)
{ {
case 3: case 3:
SetEscortPaused(true); SetEscortPaused(true);
@@ -158,12 +158,12 @@ public:
void EnterCombat(Unit* /*who*/) {} void EnterCombat(Unit* /*who*/) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (!instance) if (!instance)
return; return;
switch (i) switch (waypointId)
{ {
case 0: case 0:
DoCast(me, SPELL_TUXEDO, false); DoCast(me, SPELL_TUXEDO, false);
@@ -994,9 +994,9 @@ public:
SetDespawnAtFar(false); SetDespawnAtFar(false);
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
switch (i) switch (waypointId)
{ {
case 1: case 1:
if (Unit* car = Unit::GetCreature(*me, carGUID)) if (Unit* car = Unit::GetCreature(*me, carGUID))
@@ -239,9 +239,9 @@ public:
} }
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 0: case 0:
DoScriptText(SAY_BREAKOUT1, me); DoScriptText(SAY_BREAKOUT1, me);
@@ -497,9 +497,9 @@ public:
SetEscortPaused(bOnHold); SetEscortPaused(bOnHold);
} }
void WaypointReached(uint32 wpId) void WaypointReached(uint32 waypointId)
{ {
switch (wpId) switch (waypointId)
{ {
case 0: case 0:
me->SetWalk(false); me->SetWalk(false);
@@ -507,7 +507,6 @@ public:
break; break;
case 1: case 1:
SetHoldState(true); SetHoldState(true);
SpawnNPC(); SpawnNPC();
if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID)) if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
DoScriptText(SAY_LIGHT_OF_DAWN07, temp); DoScriptText(SAY_LIGHT_OF_DAWN07, temp);
@@ -152,7 +152,12 @@ public:
uint32 Start_Timer; uint32 Start_Timer;
void Reset() {} void Reset() {}
void WaypointReached(uint32 /*point*/) {}
void WaypointReached(uint32 /*waypointId*/)
{
}
void EnterCombat(Unit* /*who*/) {} void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
@@ -99,9 +99,9 @@ public:
InstanceScript* instance; InstanceScript* instance;
uint32 uiNpcEntry; uint32 uiNpcEntry;
void WaypointReached(uint32 uiPoint) void WaypointReached(uint32 waypointId)
{ {
switch (uiPoint) switch (waypointId)
{ {
case 0: case 0:
if (uiNpcEntry == NPC_ASH) if (uiNpcEntry == NPC_ASH)
@@ -64,14 +64,13 @@ class npc_professor_phizzlethorpe : public CreatureScript
{ {
npc_professor_phizzlethorpeAI(Creature* creature) : npc_escortAI(creature) {} npc_professor_phizzlethorpeAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (uiPointId) switch (waypointId)
{ {
case 4: case 4:
Talk(SAY_PROGRESS_2, player->GetGUID()); Talk(SAY_PROGRESS_2, player->GetGUID());
@@ -130,14 +130,13 @@ public:
{ {
npc_ranger_lilathaAI(Creature* creature) : npc_escortAI(creature) {} npc_ranger_lilathaAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 0: case 0:
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
@@ -145,16 +144,13 @@ public:
Cage->SetGoState(GO_STATE_ACTIVE); Cage->SetGoState(GO_STATE_ACTIVE);
DoScriptText(SAY_START, me, player); DoScriptText(SAY_START, me, player);
break; break;
case 5: case 5:
DoScriptText(SAY_PROGRESS1, me, player); DoScriptText(SAY_PROGRESS1, me, player);
break; break;
case 11: case 11:
DoScriptText(SAY_PROGRESS2, me, player); DoScriptText(SAY_PROGRESS2, me, player);
me->SetOrientation(4.762841f); me->SetOrientation(4.762841f);
break; break;
case 18: case 18:
{ {
DoScriptText(SAY_PROGRESS3, me, player); DoScriptText(SAY_PROGRESS3, me, player);
@@ -168,25 +164,20 @@ public:
me->AI()->AttackStart(Summ1); me->AI()->AttackStart(Summ1);
} }
break; break;
case 19: case 19:
me->SetWalk(false); me->SetWalk(false);
break; break;
case 25: case 25:
me->SetWalk(true); me->SetWalk(true);
break; break;
case 30: case 30:
if (player->GetTypeId() == TYPEID_PLAYER) if (player->GetTypeId() == TYPEID_PLAYER)
CAST_PLR(player)->GroupEventHappens(QUEST_ESCAPE_FROM_THE_CATACOMBS, me); CAST_PLR(player)->GroupEventHappens(QUEST_ESCAPE_FROM_THE_CATACOMBS, me);
break; break;
case 32: case 32:
me->SetOrientation(2.978281f); me->SetOrientation(2.978281f);
DoScriptText(SAY_END1, me, player); DoScriptText(SAY_END1, me, player);
break; break;
case 33: case 33:
me->SetOrientation(5.858011f); me->SetOrientation(5.858011f);
DoScriptText(SAY_END2, me, player); DoScriptText(SAY_END2, me, player);
@@ -87,9 +87,9 @@ public:
void Reset() { } void Reset() { }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 26: case 26:
DoScriptText(SAY_OOX_AMBUSH, me); DoScriptText(SAY_OOX_AMBUSH, me);
@@ -276,14 +276,13 @@ public:
summoned->GetMotionMaster()->MovePoint(0, m_afAmbushMoveTo[m_iSpawnId].m_fX, m_afAmbushMoveTo[m_iSpawnId].m_fY, m_afAmbushMoveTo[m_iSpawnId].m_fZ); summoned->GetMotionMaster()->MovePoint(0, m_afAmbushMoveTo[m_iSpawnId].m_fX, m_afAmbushMoveTo[m_iSpawnId].m_fY, m_afAmbushMoveTo[m_iSpawnId].m_fZ);
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (uiPointId) switch (waypointId)
{ {
case 1: case 1:
DoScriptText(SAY_RIN_FREE, me, player); DoScriptText(SAY_RIN_FREE, me, player);
@@ -76,17 +76,16 @@ public:
uiShieldBashTimer = 8000; uiShieldBashTimer = 8000;
} }
void WaypointReached(uint32 uiI) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
if (uiI >= 65 && me->GetUnitMovementFlags() == MOVEMENTFLAG_WALKING) if (waypointId >= 65 && me->GetUnitMovementFlags() == MOVEMENTFLAG_WALKING)
me->SetWalk(false); me->SetWalk(false);
switch (uiI) switch (waypointId)
{ {
case 39: case 39:
SetEscortPaused(true); SetEscortPaused(true);
@@ -66,50 +66,41 @@ public:
{ {
npc_deathstalker_erlandAI(Creature* creature) : npc_escortAI(creature) {} npc_deathstalker_erlandAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 1: case 1:
DoScriptText(SAY_START, me, player); DoScriptText(SAY_START, me, player);
break; break;
case 13: case 13:
DoScriptText(SAY_LAST, me, player); DoScriptText(SAY_LAST, me, player);
player->GroupEventHappens(QUEST_ESCORTING, me); player->GroupEventHappens(QUEST_ESCORTING, me);
break; break;
case 14: case 14:
DoScriptText(SAY_THANKS, me, player); DoScriptText(SAY_THANKS, me, player);
break; break;
case 15: case 15:
if (Unit* Rane = me->FindNearestCreature(NPC_RANE, 20)) if (Unit* Rane = me->FindNearestCreature(NPC_RANE, 20))
DoScriptText(SAY_RANE, Rane); DoScriptText(SAY_RANE, Rane);
break; break;
case 16: case 16:
DoScriptText(SAY_ANSWER, me); DoScriptText(SAY_ANSWER, me);
break; break;
case 17: case 17:
DoScriptText(SAY_MOVE_QUINN, me); DoScriptText(SAY_MOVE_QUINN, me);
break; break;
case 24: case 24:
DoScriptText(SAY_GREETINGS, me); DoScriptText(SAY_GREETINGS, me);
break; break;
case 25: case 25:
if (Unit* Quinn = me->FindNearestCreature(NPC_QUINN, 20)) if (Unit* Quinn = me->FindNearestCreature(NPC_QUINN, 20))
DoScriptText(SAY_QUINN, Quinn); DoScriptText(SAY_QUINN, Quinn);
break; break;
case 26: case 26:
DoScriptText(SAY_ON_BYE, me, NULL); DoScriptText(SAY_ON_BYE, me, NULL);
break; break;
@@ -268,9 +268,9 @@ public:
} }
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 14: case 14:
SetEscortPaused(true); SetEscortPaused(true);
@@ -497,9 +497,9 @@ public:
uiPhase = 0; uiPhase = 0;
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 1: case 1:
SetEscortPaused(true); SetEscortPaused(true);
@@ -106,9 +106,9 @@ public:
} }
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 0: case 0:
if (GameObject* pCage = me->GetMap()->GetGameObject(m_uiGalensCageGUID)) if (GameObject* pCage = me->GetMap()->GetGameObject(m_uiGalensCageGUID))
@@ -328,10 +328,11 @@ public:
summoned->AI()->AttackStart(me); summoned->AI()->AttackStart(me);
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
switch (i)
switch (waypointId)
{ {
case 8: case 8:
DoScriptText(SAY_WP_0, me); DoScriptText(SAY_WP_0, me);
+14 -10
View File
@@ -85,9 +85,15 @@ public:
{ {
switch (uiWPHolder) switch (uiWPHolder)
{ {
case 7: DoScriptText(SAY_DS_DOWN_1, me); break; case 7:
case 8: DoScriptText(SAY_DS_DOWN_2, me); break; DoScriptText(SAY_DS_DOWN_1, me);
case 9: DoScriptText(SAY_DS_DOWN_3, me); break; break;
case 8:
DoScriptText(SAY_DS_DOWN_2, me);
break;
case 9:
DoScriptText(SAY_DS_DOWN_3, me);
break;
} }
} }
else else
@@ -96,16 +102,15 @@ public:
uiShootTimer = 0; uiShootTimer = 0;
} }
void WaypointReached(uint32 uiPoint) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
uiWPHolder = uiPoint; uiWPHolder = waypointId;
switch (uiPoint) switch (waypointId)
{ {
case 4: case 4:
SetEquipmentSlots(false, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE, EQUIP_ID_RIFLE); SetEquipmentSlots(false, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE, EQUIP_ID_RIFLE);
@@ -226,14 +231,13 @@ public:
{ {
npc_defias_traitorAI(Creature* creature) : npc_escortAI(creature) { Reset(); } npc_defias_traitorAI(Creature* creature) : npc_escortAI(creature) { Reset(); }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 35: case 35:
SetRun(false); SetRun(false);
@@ -67,14 +67,13 @@ public:
m_bFriendSummoned = false; m_bFriendSummoned = false;
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 2: case 2:
if (me->HasStealthAura()) if (me->HasStealthAura())
me->RemoveAurasByType(SPELL_AURA_MOD_STEALTH); me->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
SetRun(); SetRun();
me->setFaction(FACTION_ENEMY); me->setFaction(FACTION_ENEMY);
break; break;
@@ -75,9 +75,9 @@ class example_escort : public CreatureScript
} }
// Pure Virtual Functions (Have to be implemented) // Pure Virtual Functions (Have to be implemented)
void WaypointReached(uint32 uiWP) void WaypointReached(uint32 waypointId)
{ {
switch (uiWP) switch (waypointId)
{ {
case 1: case 1:
DoScriptText(SAY_WP_1, me); DoScriptText(SAY_WP_1, me);
@@ -236,9 +236,9 @@ public:
Start(false, false, 0); Start(false, false, 0);
} }
void WaypointReached(uint32 uiPoint) void WaypointReached(uint32 waypointId)
{ {
switch (uiPoint) switch (waypointId)
{ {
case 4: case 4:
SetEscortPaused(true); SetEscortPaused(true);
@@ -115,9 +115,9 @@ public:
} }
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 7 && instance) if (waypointId == 7 && instance)
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->isAlive()) if (target && target->isAlive())
@@ -644,7 +644,11 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
void WaypointReached(uint32 /*i*/){}
void WaypointReached(uint32 /*waypointId*/)
{
}
}; };
}; };
@@ -111,9 +111,9 @@ public:
} }
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 7 && instance) if (waypointId == 7 && instance)
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
if (target && target->isAlive()) if (target && target->isAlive())
@@ -241,7 +241,7 @@ public:
{ {
} }
void WaypointReached(uint32 /*i*/) void WaypointReached(uint32 /*waypointId*/)
{ {
} }
@@ -103,9 +103,9 @@ public:
} }
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 7 && instance) if (waypointId == 7 && instance)
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
if (target && target->isAlive()) if (target && target->isAlive())
@@ -105,9 +105,9 @@ public:
} }
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 7 && instance) if (waypointId == 7 && instance)
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->isAlive()) if (target && target->isAlive())
@@ -980,9 +980,9 @@ void hyjalAI::RespawnNearPos(float x, float y)
cell.Visit(p, obj_worker, *me->GetMap(), *me, me->GetGridActivationRange()); cell.Visit(p, obj_worker, *me->GetMap(), *me, me->GetGridActivationRange());
} }
void hyjalAI::WaypointReached(uint32 i) void hyjalAI::WaypointReached(uint32 waypointId)
{ {
if (i == 1 || (i == 0 && me->GetEntry() == THRALL)) if (waypointId == 1 || (waypointId == 0 && me->GetEntry() == THRALL))
{ {
me->MonsterYell(YELL_HURRY, 0, 0); me->MonsterYell(YELL_HURRY, 0, 0);
WaitForTeleport = true; WaitForTeleport = true;
@@ -196,7 +196,7 @@ struct hyjalAI : public npc_escortAI
void SummonedCreatureDespawn(Creature* summoned); void SummonedCreatureDespawn(Creature* summoned);
void HideNearPos(float x, float y); void HideNearPos(float x, float y);
void RespawnNearPos(float x, float y); void RespawnNearPos(float x, float y);
void WaypointReached(uint32 i); void WaypointReached(uint32 waypointId);
void DoOverrun(uint32 faction, const uint32 diff); void DoOverrun(uint32 faction, const uint32 diff);
void MoveInLineOfSight(Unit* who); void MoveInLineOfSight(Unit* who);
@@ -425,9 +425,9 @@ public:
void EnterCombat(Unit* /*who*/) {} void EnterCombat(Unit* /*who*/) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 0 && instance && !IsOverrun) if (waypointId == 0 && instance && !IsOverrun)
{ {
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{ {
@@ -550,22 +550,24 @@ public:
KnockDownTimer = 10000; KnockDownTimer = 10000;
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 7 && instance && !IsOverrun) if (waypointId == 7 && instance && !IsOverrun)
{ {
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
}else{ }
else
{
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
} }
} }
if (i == LastOverronPos && IsOverrun) if (waypointId == LastOverronPos && IsOverrun)
{ {
if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21)) if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21))
{ {
@@ -652,22 +654,24 @@ public:
RandomMove = false; RandomMove = false;
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 7 && instance && !IsOverrun) if (waypointId == 7 && instance && !IsOverrun)
{ {
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
}else{ }
else
{
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
} }
} }
if (i == LastOverronPos && IsOverrun) if (waypointId == LastOverronPos && IsOverrun)
{ {
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK_UNARMED); me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK_UNARMED);
if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21)) if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21))
@@ -675,7 +679,6 @@ public:
me->setDeathState(DEAD); me->setDeathState(DEAD);
me->RemoveCorpse(); me->RemoveCorpse();
} }
} }
} }
@@ -770,16 +773,18 @@ public:
summons.Despawn(summon); summons.Despawn(summon);
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 7 && instance && !IsOverrun) if (waypointId == 7 && instance && !IsOverrun)
{ {
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
}else{ }
else
{
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
@@ -888,16 +893,18 @@ public:
ShellTimer = 50000+rand()%10000; ShellTimer = 50000+rand()%10000;
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 7 && instance && !IsOverrun) if (waypointId == 7 && instance && !IsOverrun)
{ {
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
}else{ }
else
{
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
@@ -987,16 +994,18 @@ public:
WebTimer = 20000+rand()%5000; WebTimer = 20000+rand()%5000;
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 7 && instance && !IsOverrun) if (waypointId == 7 && instance && !IsOverrun)
{ {
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
}else{ }
else
{
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
@@ -1077,16 +1086,18 @@ public:
ManaBurnTimer = 9000+rand()%5000; ManaBurnTimer = 9000+rand()%5000;
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 7 && instance && !IsOverrun) if (waypointId == 7 && instance && !IsOverrun)
{ {
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
}else{ }
else
{
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
if (target && target->isAlive()) if (target && target->isAlive())
me->AddThreat(target, 0.0f); me->AddThreat(target, 0.0f);
@@ -1170,9 +1181,9 @@ public:
me->SetDisableGravity(true); me->SetDisableGravity(true);
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 2 && instance && !IsOverrun) if (waypointId == 2 && instance && !IsOverrun)
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
if (target && target->isAlive()) if (target && target->isAlive())
@@ -1289,9 +1300,9 @@ public:
me->SetDisableGravity(true); me->SetDisableGravity(true);
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (i == 2 && instance && !IsOverrun) if (waypointId == 2 && instance && !IsOverrun)
{ {
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL)); Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
if (target && target->isAlive()) if (target && target->isAlive())
@@ -446,9 +446,9 @@ public:
++uiStep; ++uiStep;
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 0: case 0:
case 1: case 1:
@@ -296,12 +296,12 @@ public:
bool LowHp; bool LowHp;
bool HadMount; bool HadMount;
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (!instance) if (!instance)
return; return;
switch (i) switch (waypointId)
{ {
case 8: case 8:
SetRun(false); SetRun(false);
@@ -433,7 +433,6 @@ public:
//trigger epoch Yell("Thrall! Come outside and face your fate! ....") //trigger epoch Yell("Thrall! Come outside and face your fate! ....")
//from here, thrall should not never be allowed to move to point 106 which he currently does. //from here, thrall should not never be allowed to move to point 106 which he currently does.
break; break;
case 106: case 106:
{ {
//trigger taretha to run down outside //trigger taretha to run down outside
@@ -631,9 +630,9 @@ public:
InstanceScript* instance; InstanceScript* instance;
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
switch (i) switch (waypointId)
{ {
case 6: case 6:
DoScriptText(SAY_TA_FREE, me); DoScriptText(SAY_TA_FREE, me);
@@ -643,6 +642,7 @@ public:
break; break;
} }
} }
void Reset() {} void Reset() {}
void EnterCombat(Unit* /*who*/) {} void EnterCombat(Unit* /*who*/) {}
@@ -72,14 +72,13 @@ public:
{ {
npc_willixAI(Creature* creature) : npc_escortAI(creature) {} npc_willixAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 3: case 3:
me->HandleEmoteCommand(EMOTE_STATE_POINT); me->HandleEmoteCommand(EMOTE_STATE_POINT);
@@ -151,12 +151,12 @@ public:
uint32 eventProgress; uint32 eventProgress;
InstanceScript* instance; InstanceScript* instance;
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
if (!instance) if (!instance)
return; return;
switch (i) switch (waypointId)
{ {
case 4: case 4:
eventProgress = 1; eventProgress = 1;
+8 -10
View File
@@ -76,14 +76,13 @@ class npc_torek : public CreatureScript
uint32 Thunderclap_Timer; uint32 Thunderclap_Timer;
bool Completed; bool Completed;
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 1: case 1:
Talk(SAY_MOVE, player->GetGUID()); Talk(SAY_MOVE, player->GetGUID());
@@ -182,32 +181,29 @@ class npc_ruul_snowhoof : public CreatureScript
{ {
npc_ruul_snowhoofAI(Creature* creature) : npc_escortAI(creature) { } npc_ruul_snowhoofAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 0: case 0:
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20)) if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20))
Cage->SetGoState(GO_STATE_ACTIVE); Cage->SetGoState(GO_STATE_ACTIVE);
break; break;
case 13: case 13:
me->SummonCreature(3922, 3449.218018f, -587.825073f, 174.978867f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000); me->SummonCreature(3922, 3449.218018f, -587.825073f, 174.978867f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000);
me->SummonCreature(3921, 3446.384521f, -587.830872f, 175.186279f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000); me->SummonCreature(3921, 3446.384521f, -587.830872f, 175.186279f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000);
me->SummonCreature(3926, 3444.218994f, -587.835327f, 175.380600f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000); me->SummonCreature(3926, 3444.218994f, -587.835327f, 175.380600f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000);
break; break;
case 19: case 19:
me->SummonCreature(3922, 3508.344482f, -492.024261f, 186.929031f, 4.145029f, TEMPSUMMON_DEAD_DESPAWN, 60000); me->SummonCreature(3922, 3508.344482f, -492.024261f, 186.929031f, 4.145029f, TEMPSUMMON_DEAD_DESPAWN, 60000);
me->SummonCreature(3921, 3506.265625f, -490.531006f, 186.740128f, 4.239277f, TEMPSUMMON_DEAD_DESPAWN, 60000); me->SummonCreature(3921, 3506.265625f, -490.531006f, 186.740128f, 4.239277f, TEMPSUMMON_DEAD_DESPAWN, 60000);
me->SummonCreature(3926, 3503.682373f, -489.393799f, 186.629684f, 4.349232f, TEMPSUMMON_DEAD_DESPAWN, 60000); me->SummonCreature(3926, 3503.682373f, -489.393799f, 186.629684f, 4.349232f, TEMPSUMMON_DEAD_DESPAWN, 60000);
break; break;
case 21: case 21:
player->GroupEventHappens(QUEST_FREEDOM_TO_RUUL, me); player->GroupEventHappens(QUEST_FREEDOM_TO_RUUL, me);
break; break;
@@ -316,16 +312,18 @@ class npc_muglash : public CreatureScript
summoned->AI()->AttackStart(me); summoned->AI()->AttackStart(me);
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
switch (i) switch (waypointId)
{ {
case 0: case 0:
if (player)
DoScriptText(SAY_MUG_START2, me, player); DoScriptText(SAY_MUG_START2, me, player);
break; break;
case 24: case 24:
if (player)
DoScriptText(SAY_MUG_BRAZIER, me, player); DoScriptText(SAY_MUG_BRAZIER, me, player);
if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2)) if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2))
@@ -374,14 +374,13 @@ public:
{ {
npc_magwinAI(Creature* creature) : npc_escortAI(creature) {} npc_magwinAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 0: case 0:
DoScriptText(SAY_START, me, player); DoScriptText(SAY_START, me, player);
+2 -2
View File
@@ -231,13 +231,13 @@ public:
{ {
npc_prospector_remtravelAI(Creature* creature) : npc_escortAI(creature) {} npc_prospector_remtravelAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 0: case 0:
DoScriptText(SAY_REM_START, me, player); DoScriptText(SAY_REM_START, me, player);
+3 -2
View File
@@ -228,10 +228,11 @@ public:
{ {
npc_dalindaAI(Creature* creature) : npc_escortAI(creature) { } npc_dalindaAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
switch (i)
switch (waypointId)
{ {
case 1: case 1:
me->IsStandState(); me->IsStandState();
@@ -607,13 +607,13 @@ public:
{ {
npc_stinkyAI(Creature* creature) : npc_escortAI(creature) { } npc_stinkyAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 7: case 7:
DoScriptText(SAY_STAY_1, me, player); DoScriptText(SAY_STAY_1, me, player);
@@ -649,7 +649,6 @@ public:
case 39: case 39:
DoScriptText(EMOTE_DISAPPEAR, me); DoScriptText(EMOTE_DISAPPEAR, me);
break; break;
} }
} }
+2 -2
View File
@@ -124,9 +124,9 @@ public:
{ {
npc_oox22feAI(Creature* creature) : npc_escortAI(creature) { } npc_oox22feAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
switch (i) switch (waypointId)
{ {
// First Ambush(3 Yetis) // First Ambush(3 Yetis)
case 11: case 11:
+2 -2
View File
@@ -537,9 +537,9 @@ public:
} else if (Event_onWait) Event_Timer -= diff; } else if (Event_onWait) Event_Timer -= diff;
} }
void WaypointReached(uint32 id) void WaypointReached(uint32 waypointId)
{ {
CurrWP = id; CurrWP = waypointId;
Event_Timer = 0; Event_Timer = 0;
Step = 0; Step = 0;
Event_onWait = true; Event_onWait = true;
@@ -114,14 +114,13 @@ public:
{ {
npc_kaya_flathoofAI(Creature* creature) : npc_escortAI(creature) {} npc_kaya_flathoofAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 16: case 16:
DoScriptText(SAY_AMBUSH, me); DoScriptText(SAY_AMBUSH, me);
@@ -129,7 +128,6 @@ public:
me->SummonCreature(NPC_GRIMTOTEM_RUFFIAN, -38.85f, -503.77f, -45.90f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); me->SummonCreature(NPC_GRIMTOTEM_RUFFIAN, -38.85f, -503.77f, -45.90f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
me->SummonCreature(NPC_GRIMTOTEM_SORCERER, -36.37f, -496.23f, -45.71f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); me->SummonCreature(NPC_GRIMTOTEM_SORCERER, -36.37f, -496.23f, -45.71f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break; break;
case 18: case 18:
me->SetInFront(player); me->SetInFront(player);
DoScriptText(SAY_END, me, player); DoScriptText(SAY_END, me, player);
+55 -24
View File
@@ -172,31 +172,65 @@ public:
{ {
npc_custodian_of_timeAI(Creature* creature) : npc_escortAI(creature) {} npc_custodian_of_timeAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 0: DoScriptText(WHISPER_CUSTODIAN_1, me, player); break; case 0:
case 1: DoScriptText(WHISPER_CUSTODIAN_2, me, player); break; DoScriptText(WHISPER_CUSTODIAN_1, me, player);
case 2: DoScriptText(WHISPER_CUSTODIAN_3, me, player); break; break;
case 3: DoScriptText(WHISPER_CUSTODIAN_4, me, player); break; case 1:
case 5: DoScriptText(WHISPER_CUSTODIAN_5, me, player); break; DoScriptText(WHISPER_CUSTODIAN_2, me, player);
case 6: DoScriptText(WHISPER_CUSTODIAN_6, me, player); break; break;
case 7: DoScriptText(WHISPER_CUSTODIAN_7, me, player); break; case 2:
case 8: DoScriptText(WHISPER_CUSTODIAN_8, me, player); break; DoScriptText(WHISPER_CUSTODIAN_3, me, player);
case 9: DoScriptText(WHISPER_CUSTODIAN_9, me, player); break; break;
case 10: DoScriptText(WHISPER_CUSTODIAN_4, me, player); break; case 3:
case 13: DoScriptText(WHISPER_CUSTODIAN_10, me, player); break; DoScriptText(WHISPER_CUSTODIAN_4, me, player);
case 14: DoScriptText(WHISPER_CUSTODIAN_4, me, player); break; break;
case 16: DoScriptText(WHISPER_CUSTODIAN_11, me, player); break; case 5:
case 17: DoScriptText(WHISPER_CUSTODIAN_12, me, player); break; DoScriptText(WHISPER_CUSTODIAN_5, me, player);
case 18: DoScriptText(WHISPER_CUSTODIAN_4, me, player); break; break;
case 22: DoScriptText(WHISPER_CUSTODIAN_13, me, player); break; case 6:
case 23: DoScriptText(WHISPER_CUSTODIAN_4, me, player); break; DoScriptText(WHISPER_CUSTODIAN_6, me, player);
break;
case 7:
DoScriptText(WHISPER_CUSTODIAN_7, me, player);
break;
case 8:
DoScriptText(WHISPER_CUSTODIAN_8, me, player);
break;
case 9:
DoScriptText(WHISPER_CUSTODIAN_9, me, player);
break;
case 10:
DoScriptText(WHISPER_CUSTODIAN_4, me, player);
break;
case 13:
DoScriptText(WHISPER_CUSTODIAN_10, me, player);
break;
case 14:
DoScriptText(WHISPER_CUSTODIAN_4, me, player);
break;
case 16:
DoScriptText(WHISPER_CUSTODIAN_11, me, player);
break;
case 17:
DoScriptText(WHISPER_CUSTODIAN_12, me, player);
break;
case 18:
DoScriptText(WHISPER_CUSTODIAN_4, me, player);
break;
case 22:
DoScriptText(WHISPER_CUSTODIAN_13, me, player);
break;
case 23:
DoScriptText(WHISPER_CUSTODIAN_4, me, player);
break;
case 24: case 24:
DoScriptText(WHISPER_CUSTODIAN_14, me, player); DoScriptText(WHISPER_CUSTODIAN_14, me, player);
DoCast(player, 34883); DoCast(player, 34883);
@@ -428,14 +462,13 @@ public:
{ {
npc_OOX17AI(Creature* creature) : npc_escortAI(creature) {} npc_OOX17AI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 23: case 23:
me->SummonCreature(SPAWN_FIRST, -8350.96f, -4445.79f, 10.10f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(SPAWN_FIRST, -8350.96f, -4445.79f, 10.10f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
@@ -443,7 +476,6 @@ public:
me->SummonCreature(SPAWN_FIRST, -8353.96f, -4442.79f, 10.10f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(SPAWN_FIRST, -8353.96f, -4442.79f, 10.10f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
DoScriptText(SAY_OOX_AMBUSH, me); DoScriptText(SAY_OOX_AMBUSH, me);
break; break;
case 56: case 56:
me->SummonCreature(SPAWN_SECOND_1, -7510.07f, -4795.50f, 9.35f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(SPAWN_SECOND_1, -7510.07f, -4795.50f, 9.35f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_SECOND_2, -7515.07f, -4797.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(SPAWN_SECOND_2, -7515.07f, -4797.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
@@ -452,7 +484,6 @@ public:
if (Unit* scoff = me->FindNearestCreature(SPAWN_SECOND_2, 30)) if (Unit* scoff = me->FindNearestCreature(SPAWN_SECOND_2, 30))
DoScriptText(SAY_OOX17_AMBUSH_REPLY, scoff); DoScriptText(SAY_OOX17_AMBUSH_REPLY, scoff);
break; break;
case 86: case 86:
DoScriptText(SAY_OOX_END, me); DoScriptText(SAY_OOX_END, me);
player->GroupEventHappens(Q_OOX17, me); player->GroupEventHappens(Q_OOX17, me);
+4 -5
View File
@@ -127,14 +127,13 @@ public:
void Reset() { } void Reset() { }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (uiPointId) switch (waypointId)
{ {
case 16: case 16:
DoScriptText(SAY_GIL_AT_LAST, me, player); DoScriptText(SAY_GIL_AT_LAST, me, player);
@@ -593,9 +592,9 @@ public:
} }
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 0: case 0:
DoScriptText(SAY_STARTUP1, me); DoScriptText(SAY_STARTUP1, me);
@@ -75,9 +75,9 @@ public:
void Reset() { } void Reset() { }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 0: case 0:
DoScriptText(SAY_KAN_START, me); DoScriptText(SAY_KAN_START, me);
@@ -166,9 +166,9 @@ public:
void Reset() { } void Reset() { }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 8: case 8:
DoScriptText(SAY_LAKO_LOOK_OUT, me); DoScriptText(SAY_LAKO_LOOK_OUT, me);
@@ -251,9 +251,9 @@ public:
void Reset() { } void Reset() { }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 15: case 15:
DoScriptText(SAY_WYVERN, me); DoScriptText(SAY_WYVERN, me);
@@ -78,14 +78,13 @@ public:
uint32 DEMORALIZINGSHOUT_Timer; uint32 DEMORALIZINGSHOUT_Timer;
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 19: case 19:
me->SummonCreature(ENTRY_STOMPER, -6391.69f, -1730.49f, -272.83f, 4.96f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(ENTRY_STOMPER, -6391.69f, -1730.49f, -272.83f, 4.96f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
@@ -227,9 +227,9 @@ class npc_onyx_flamecaller : public CreatureScript
zarithrian->AI()->JustSummoned(me); zarithrian->AI()->JustSummoned(me);
} }
void WaypointReached(uint32 pointId) void WaypointReached(uint32 waypointId)
{ {
if (pointId == MAX_PATH_FLAMECALLER_WAYPOINTS || pointId == MAX_PATH_FLAMECALLER_WAYPOINTS*2) if (waypointId == MAX_PATH_FLAMECALLER_WAYPOINTS || waypointId == MAX_PATH_FLAMECALLER_WAYPOINTS*2)
{ {
DoZoneInCombat(); DoZoneInCombat();
SetEscortPaused(true); SetEscortPaused(true);
@@ -447,9 +447,9 @@ public:
uint8 uiWaypoint; uint8 uiWaypoint;
void WaypointReached(uint32 uiPoint) void WaypointReached(uint32 waypointId)
{ {
if (uiPoint == 0) if (waypointId == 0)
{ {
switch (uiWaypoint) switch (uiWaypoint)
{ {
@@ -356,7 +356,7 @@ public:
Start(false, true, 0, NULL); Start(false, true, 0, NULL);
} }
void WaypointReached(uint32 /*i*/) void WaypointReached(uint32 /*waypointId*/)
{ {
} }
@@ -203,16 +203,18 @@ public:
Start(false, true, 0, NULL); Start(false, true, 0, NULL);
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
switch (i) if (!instance)
return;
switch (waypointId)
{ {
case 2: case 2:
if (instance && (uiWaypointPath == 3 || uiWaypointPath == 2)) if (uiWaypointPath == 3 || uiWaypointPath == 2)
instance->SetData(DATA_MOVEMENT_DONE, instance->GetData(DATA_MOVEMENT_DONE)+1); instance->SetData(DATA_MOVEMENT_DONE, instance->GetData(DATA_MOVEMENT_DONE)+1);
break; break;
case 3: case 3:
if (instance)
instance->SetData(DATA_MOVEMENT_DONE, instance->GetData(DATA_MOVEMENT_DONE)+1); instance->SetData(DATA_MOVEMENT_DONE, instance->GetData(DATA_MOVEMENT_DONE)+1);
break; break;
} }
@@ -963,8 +963,9 @@ public:
// we dont do melee damage! // we dont do melee damage!
} }
void WaypointReached(uint32 /*i*/) void WaypointReached(uint32 /*waypointId*/)
{ {
} }
private: private:
@@ -346,9 +346,9 @@ public:
lDwarfGUIDList.clear(); lDwarfGUIDList.clear();
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 7: case 7:
if (Creature* creature = GetClosestCreatureWithEntry(me, CREATURE_TRIBUNAL_OF_THE_AGES, 100.0f)) if (Creature* creature = GetClosestCreatureWithEntry(me, CREATURE_TRIBUNAL_OF_THE_AGES, 100.0f))
@@ -964,8 +964,9 @@ public:
me->SetReactState(REACT_PASSIVE); me->SetReactState(REACT_PASSIVE);
} }
void WaypointReached(uint32 /*i*/) void WaypointReached(uint32 /*waypointId*/)
{ {
} }
void Reset() void Reset()
@@ -447,32 +447,32 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
} }
void WaypointReached(uint32 uiWPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiBoss) switch (uiBoss)
{ {
case 1: case 1:
if (uiWPointId == 2) if (waypointId == 2)
FinishPointReached(); FinishPointReached();
break; break;
case 2: case 2:
if (uiWPointId == 2) if (waypointId == 2)
FinishPointReached(); FinishPointReached();
break; break;
case 3: case 3:
if (uiWPointId == 1) if (waypointId == 1)
FinishPointReached(); FinishPointReached();
break; break;
case 4: case 4:
if (uiWPointId == 0) if (waypointId == 0)
FinishPointReached(); FinishPointReached();
break; break;
case 5: case 5:
if (uiWPointId == 0) if (waypointId == 0)
FinishPointReached(); FinishPointReached();
break; break;
case 6: case 6:
if (uiWPointId == 4) if (waypointId == 4)
FinishPointReached(); FinishPointReached();
break; break;
} }
@@ -690,32 +690,32 @@ struct violet_hold_trashAI : public npc_escortAI
uint32 portalLocationID; uint32 portalLocationID;
uint32 secondPortalRouteID; uint32 secondPortalRouteID;
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (portalLocationID) switch (portalLocationID)
{ {
case 0: case 0:
if (uiPointId == 5) if (waypointId == 5)
CreatureStartAttackDoor(); CreatureStartAttackDoor();
break; break;
case 1: case 1:
if ((uiPointId == 8 && secondPortalRouteID == 0) || (uiPointId == 7 && secondPortalRouteID == 1)) if ((waypointId == 8 && secondPortalRouteID == 0) || (waypointId == 7 && secondPortalRouteID == 1))
CreatureStartAttackDoor(); CreatureStartAttackDoor();
break; break;
case 2: case 2:
if (uiPointId == 7) if (waypointId == 7)
CreatureStartAttackDoor(); CreatureStartAttackDoor();
break; break;
case 3: case 3:
if (uiPointId == 8) if (waypointId == 8)
CreatureStartAttackDoor(); CreatureStartAttackDoor();
break; break;
case 4: case 4:
if (uiPointId == 5) if (waypointId == 5)
CreatureStartAttackDoor(); CreatureStartAttackDoor();
break; break;
case 5: case 5:
if (uiPointId == 3) if (waypointId == 3)
CreatureStartAttackDoor(); CreatureStartAttackDoor();
break; break;
} }
+8 -11
View File
@@ -716,9 +716,9 @@ public:
} }
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
switch (i) switch (waypointId)
{ {
case 0: case 0:
IntroPhase = 1; IntroPhase = 1;
@@ -1012,13 +1012,13 @@ public:
uiPhaseTimer = 0; uiPhaseTimer = 0;
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (uiPointId) switch (waypointId)
{ {
case 3: case 3:
SetEscortPaused(true); SetEscortPaused(true);
@@ -1038,7 +1038,6 @@ public:
} }
me->SetWalk(false); me->SetWalk(false);
break; break;
case 4: case 4:
SetEscortPaused(true); SetEscortPaused(true);
uiPhase = 7; uiPhase = 7;
@@ -1851,14 +1850,13 @@ public:
player->FailQuest(QUEST_ESCAPING_THE_MIST); player->FailQuest(QUEST_ESCAPING_THE_MIST);
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 10: case 10:
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
@@ -1951,14 +1949,13 @@ public:
else Bonker_agro=0; else Bonker_agro=0;
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 29: case 29:
player->GroupEventHappens(QUEST_GET_ME_OUTA_HERE, me); player->GroupEventHappens(QUEST_GET_ME_OUTA_HERE, me);
@@ -74,13 +74,13 @@ public:
summoned->AI()->AttackStart(me->getVictim()); summoned->AI()->AttackStart(me->getVictim());
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 9: case 9:
if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 100.0f)) if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 100.0f))
@@ -97,13 +97,13 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 1: case 1:
me->SetReactState(REACT_AGGRESSIVE); me->SetReactState(REACT_AGGRESSIVE);
@@ -70,16 +70,17 @@ public:
} }
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 1: SetRun(); break; case 1:
SetRun();
break;
case 10: case 10:
case 11: case 11:
case 12: case 12:
@@ -359,10 +360,11 @@ public:
uint32 m_uiChatTimer; uint32 m_uiChatTimer;
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
switch (i)
switch (waypointId)
{ {
case 0: case 0:
DoScriptText(SAY_WP_2, me); DoScriptText(SAY_WP_2, me);
+3 -4
View File
@@ -374,18 +374,17 @@ public:
{ {
npc_injured_goblinAI(Creature* creature) : npc_escortAI(creature) { } npc_injured_goblinAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 26: case 26:
DoScriptText(SAY_END_WP_REACHED, me, player); DoScriptText(SAY_END_WP_REACHED, me, player);
break; break;
case 27: case 27:
player->GroupEventHappens(QUEST_BITTER_DEPARTURE, me); player->GroupEventHappens(QUEST_BITTER_DEPARTURE, me);
break; break;
@@ -672,7 +671,7 @@ public:
} }
} }
void WaypointReached(uint32 /*wp*/) void WaypointReached(uint32 /*waypointId*/)
{ {
} }
+4 -4
View File
@@ -740,9 +740,9 @@ public:
bEnrage = false; bEnrage = false;
} }
void WaypointReached(uint32 uiI) void WaypointReached(uint32 waypointId)
{ {
switch (uiI) switch (waypointId)
{ {
case 6: case 6:
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0); me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0);
@@ -934,9 +934,9 @@ public:
bThunderClap = false; bThunderClap = false;
} }
void WaypointReached(uint32 uiI) void WaypointReached(uint32 waypointId)
{ {
switch (uiI) switch (waypointId)
{ {
case 7: case 7:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
@@ -102,7 +102,7 @@ public:
npc_escortAI::MoveInLineOfSight(who); npc_escortAI::MoveInLineOfSight(who);
} }
void WaypointReached(uint32 /*i*/) void WaypointReached(uint32 /*waypointId*/)
{ {
} }
@@ -180,9 +180,9 @@ public:
npc_escortAI::MoveInLineOfSight(who); npc_escortAI::MoveInLineOfSight(who);
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 0: case 0:
DoScriptText(EMOTE_WOLF_LIFT_HEAD, me); DoScriptText(EMOTE_WOLF_LIFT_HEAD, me);
@@ -402,14 +402,13 @@ public:
{ {
npc_wounded_blood_elfAI(Creature* creature) : npc_escortAI(creature) {} npc_wounded_blood_elfAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 0: case 0:
DoScriptText(SAY_ELF_START, me, player); DoScriptText(SAY_ELF_START, me, player);
+4 -4
View File
@@ -221,9 +221,9 @@ public:
DoCast(me, SPELL_EARTHBIND_TOTEM, false); DoCast(me, SPELL_EARTHBIND_TOTEM, false);
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
switch (uiPointId) switch (waypointId)
{ {
case 7: case 7:
DoScriptText(SAY_MAG_MORE, me); DoScriptText(SAY_MAG_MORE, me);
@@ -565,9 +565,9 @@ public:
} }
} }
void WaypointReached(uint32 PointId) void WaypointReached(uint32 waypointId)
{ {
switch(PointId) switch (waypointId)
{ {
case 3: case 3:
{ {
+8 -9
View File
@@ -889,33 +889,32 @@ public:
player->FailQuest(Q_ALMABTRIEB); player->FailQuest(Q_ALMABTRIEB);
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 3: //first spawn case 3: //first spawn
me->SummonCreature(SPAWN_FIRST, 2449.67f, 2183.11f, 96.85f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(SPAWN_FIRST, 2449.67f, 2183.11f, 96.85f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_FIRST, 2449.53f, 2184.43f, 96.36f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(SPAWN_FIRST, 2449.53f, 2184.43f, 96.36f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_FIRST, 2449.85f, 2186.34f, 97.57f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(SPAWN_FIRST, 2449.85f, 2186.34f, 97.57f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break; break;
case 7: case 7:
me->SummonCreature(SPAWN_SECOND, 2309.64f, 2186.24f, 92.25f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(SPAWN_SECOND, 2309.64f, 2186.24f, 92.25f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_SECOND, 2309.25f, 2183.46f, 91.75f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(SPAWN_SECOND, 2309.25f, 2183.46f, 91.75f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break; break;
case 12: case 12:
player->GroupEventHappens(Q_ALMABTRIEB, me); player->GroupEventHappens(Q_ALMABTRIEB, me);
if (me->FindNearestCreature(N_THADELL, 30)) if (me->FindNearestCreature(N_THADELL, 30))
DoScriptText(SAY_THADELL_1, me); break; DoScriptText(SAY_THADELL_1, me);
break;
case 13: case 13:
if (me->FindNearestCreature(N_THADELL, 30)) if (me->FindNearestCreature(N_THADELL, 30))
DoScriptText(SAY_THADELL_2, me, player); break; DoScriptText(SAY_THADELL_2, me, player);
break;
} }
} }
@@ -964,13 +963,13 @@ public:
uiTakeTimer=3000; uiTakeTimer=3000;
} }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 7: case 7:
case 17: case 17:
@@ -1054,14 +1054,13 @@ public:
m_uiHealingTimer = 0; m_uiHealingTimer = 0;
} }
void WaypointReached(uint32 uiPointId) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (uiPointId) switch (waypointId)
{ {
case 13: case 13:
DoScriptText(SAY_WIL_PROGRESS1, me, player); DoScriptText(SAY_WIL_PROGRESS1, me, player);
+65 -24
View File
@@ -319,36 +319,77 @@ public:
public: public:
npc_kservantAI(Creature* creature) : npc_escortAI(creature) {} npc_kservantAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 0: DoScriptText(SAY1, me, player); break; case 0:
case 4: DoScriptText(WHISP1, me, player); break; DoScriptText(SAY1, me, player);
case 6: DoScriptText(WHISP2, me, player); break; break;
case 7: DoScriptText(WHISP3, me, player); break; case 4:
case 8: DoScriptText(WHISP4, me, player); break; DoScriptText(WHISP1, me, player);
case 17: DoScriptText(WHISP5, me, player); break; break;
case 18: DoScriptText(WHISP6, me, player); break; case 6:
case 19: DoScriptText(WHISP7, me, player); break; DoScriptText(WHISP2, me, player);
case 33: DoScriptText(WHISP8, me, player); break; break;
case 34: DoScriptText(WHISP9, me, player); break; case 7:
case 35: DoScriptText(WHISP10, me, player); break; DoScriptText(WHISP3, me, player);
case 36: DoScriptText(WHISP11, me, player); break; break;
case 43: DoScriptText(WHISP12, me, player); break; case 8:
case 44: DoScriptText(WHISP13, me, player); break; DoScriptText(WHISP4, me, player);
case 49: DoScriptText(WHISP14, me, player); break; break;
case 50: DoScriptText(WHISP15, me, player); break; case 17:
case 51: DoScriptText(WHISP16, me, player); break; DoScriptText(WHISP5, me, player);
case 52: DoScriptText(WHISP17, me, player); break; break;
case 53: DoScriptText(WHISP18, me, player); break; case 18:
case 54: DoScriptText(WHISP19, me, player); break; DoScriptText(WHISP6, me, player);
case 55: DoScriptText(WHISP20, me, player); break; break;
case 19:
DoScriptText(WHISP7, me, player);
break;
case 33:
DoScriptText(WHISP8, me, player);
break;
case 34:
DoScriptText(WHISP9, me, player);
break;
case 35:
DoScriptText(WHISP10, me, player);
break;
case 36:
DoScriptText(WHISP11, me, player);
break;
case 43:
DoScriptText(WHISP12, me, player);
break;
case 44:
DoScriptText(WHISP13, me, player);
break;
case 49:
DoScriptText(WHISP14, me, player);
break;
case 50:
DoScriptText(WHISP15, me, player);
break;
case 51:
DoScriptText(WHISP16, me, player);
break;
case 52:
DoScriptText(WHISP17, me, player);
break;
case 53:
DoScriptText(WHISP18, me, player);
break;
case 54:
DoScriptText(WHISP19, me, player);
break;
case 55:
DoScriptText(WHISP20, me, player);
break;
case 56: case 56:
DoScriptText(WHISP21, me, player); DoScriptText(WHISP21, me, player);
player->GroupEventHappens(10211, me); player->GroupEventHappens(10211, me);
+6 -14
View File
@@ -202,13 +202,13 @@ public:
public: public:
npc_skywingAI(Creature* creature) : npc_escortAI(creature) {} npc_skywingAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 8: case 8:
player->AreaExploredOrEventHappens(10898); player->AreaExploredOrEventHappens(10898);
@@ -461,32 +461,27 @@ public:
{ {
npc_isla_starmaneAI(Creature* creature) : npc_escortAI(creature) {} npc_isla_starmaneAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 0: case 0:
if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 10)) if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 10))
Cage->SetGoState(GO_STATE_ACTIVE); Cage->SetGoState(GO_STATE_ACTIVE);
break; break;
case 2: case 2:
DoScriptText(SAY_PROGRESS_1, me, player); DoScriptText(SAY_PROGRESS_1, me, player);
break; break;
case 5: case 5:
DoScriptText(SAY_PROGRESS_2, me, player); DoScriptText(SAY_PROGRESS_2, me, player);
break; break;
case 6: case 6:
DoScriptText(SAY_PROGRESS_3, me, player); DoScriptText(SAY_PROGRESS_3, me, player);
break; break;
case 29: case 29:
DoScriptText(SAY_PROGRESS_4, me, player); DoScriptText(SAY_PROGRESS_4, me, player);
if (player->GetTeam() == ALLIANCE) if (player->GetTeam() == ALLIANCE)
@@ -495,11 +490,9 @@ public:
player->GroupEventHappens(QUEST_EFTW_H, me); player->GroupEventHappens(QUEST_EFTW_H, me);
me->SetInFront(player); me->SetInFront(player);
break; break;
case 30: case 30:
me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE);
break; break;
case 31: case 31:
DoCast(me, SPELL_CAT); DoCast(me, SPELL_CAT);
me->SetWalk(false); me->SetWalk(false);
@@ -673,14 +666,13 @@ public:
{ {
npc_akunoAI(Creature* creature) : npc_escortAI(creature) {} npc_akunoAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 3: case 3:
me->SummonCreature(NPC_CABAL_SKRIMISHER, -2795.99f, 5420.33f, -34.53f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); me->SummonCreature(NPC_CABAL_SKRIMISHER, -2795.99f, 5420.33f, -34.53f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+2 -3
View File
@@ -322,14 +322,13 @@ public:
void Reset() { } void Reset() { }
void WaypointReached(uint32 i) void WaypointReached(uint32 waypointId)
{ {
Player* player = GetPlayerForEscort(); Player* player = GetPlayerForEscort();
if (!player) if (!player)
return; return;
switch (i) switch (waypointId)
{ {
case 4: case 4:
DoScriptText(SAY_AMBUSH1, me, player); DoScriptText(SAY_AMBUSH1, me, player);
+2 -1
View File
@@ -1040,8 +1040,9 @@ public:
} }
} }
void WaypointReached(uint32 /*point*/) void WaypointReached(uint32 /*waypointId*/)
{ {
} }
void UpdateAI(uint32 const diff) void UpdateAI(uint32 const diff)