Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <[email protected]>
This commit is contained in:
@@ -207,6 +207,7 @@ bool World::RemoveSession(uint32 id)
|
||||
{
|
||||
if (itr->second->PlayerLoading())
|
||||
return false;
|
||||
|
||||
itr->second->KickPlayer();
|
||||
}
|
||||
|
||||
@@ -218,8 +219,7 @@ void World::AddSession(WorldSession* s)
|
||||
addSessQueue.add(s);
|
||||
}
|
||||
|
||||
void
|
||||
World::AddSession_(WorldSession* s)
|
||||
void World::AddSession_(WorldSession* s)
|
||||
{
|
||||
ASSERT (s);
|
||||
|
||||
@@ -272,11 +272,8 @@ World::AddSession_(WorldSession* s)
|
||||
}
|
||||
|
||||
s->SendAuthResponse(AUTH_OK, true);
|
||||
|
||||
s->SendAddonsInfo();
|
||||
|
||||
s->SendClientCacheVersion(sWorld->getIntConfig(CONFIG_CLIENTCACHE_VERSION));
|
||||
|
||||
s->SendTutorialsData();
|
||||
|
||||
UpdateMaxSessionCounters();
|
||||
|
||||
@@ -277,9 +277,7 @@ public:
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
summoned->AI()->AttackStart(player);
|
||||
}
|
||||
|
||||
if (summoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH)
|
||||
m_uiValrothGUID = summoned->GetGUID();
|
||||
|
||||
@@ -99,8 +99,7 @@ class npc_professor_phizzlethorpe : public CreatureScript
|
||||
case 20:
|
||||
Talk(EMOTE_PROGRESS_8);
|
||||
Talk(SAY_PROGRESS_9, player->GetGUID());
|
||||
if (player)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, me);
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,52 +139,61 @@ public:
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20))
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
DoScriptText(SAY_START, me, player);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
DoScriptText(SAY_PROGRESS1, me, player);
|
||||
case 11:
|
||||
DoScriptText(SAY_PROGRESS2, me, player);
|
||||
me->SetOrientation(4.762841f);
|
||||
break;
|
||||
case 18:
|
||||
{
|
||||
DoScriptText(SAY_PROGRESS3, me, player);
|
||||
Creature* Summ1 = me->SummonCreature(16342, 7627.083984f, -7532.538086f, 152.128616f, 1.082733f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
Creature* Summ2 = me->SummonCreature(16343, 7620.432129f, -7532.550293f, 152.454865f, 0.827478f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
if (Summ1 && Summ2)
|
||||
{
|
||||
Summ1->Attack(me, true);
|
||||
Summ2->Attack(player, true);
|
||||
}
|
||||
me->AI()->AttackStart(Summ1);
|
||||
break;
|
||||
}
|
||||
case 19: me->SetWalk(false);
|
||||
break;
|
||||
case 25: me->SetWalk(true);
|
||||
break;
|
||||
case 30:
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_ESCAPE_FROM_THE_CATACOMBS, me);
|
||||
break;
|
||||
case 32:
|
||||
me->SetOrientation(2.978281f);
|
||||
DoScriptText(SAY_END1, me, player);
|
||||
break;
|
||||
case 33:
|
||||
me->SetOrientation(5.858011f);
|
||||
DoScriptText(SAY_END2, me, player);
|
||||
Unit* CaptainHelios = me->FindNearestCreature(NPC_CAPTAIN_HELIOS, 50);
|
||||
if (CaptainHelios)
|
||||
DoScriptText(SAY_CAPTAIN_ANSWER, CaptainHelios, player);
|
||||
break;
|
||||
case 0:
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20))
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
DoScriptText(SAY_START, me, player);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
DoScriptText(SAY_PROGRESS1, me, player);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
DoScriptText(SAY_PROGRESS2, me, player);
|
||||
me->SetOrientation(4.762841f);
|
||||
break;
|
||||
|
||||
case 18:
|
||||
{
|
||||
DoScriptText(SAY_PROGRESS3, me, player);
|
||||
Creature* Summ1 = me->SummonCreature(16342, 7627.083984f, -7532.538086f, 152.128616f, 1.082733f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
Creature* Summ2 = me->SummonCreature(16343, 7620.432129f, -7532.550293f, 152.454865f, 0.827478f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
if (Summ1 && Summ2)
|
||||
{
|
||||
Summ1->Attack(me, true);
|
||||
Summ2->Attack(player, true);
|
||||
}
|
||||
me->AI()->AttackStart(Summ1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 19:
|
||||
me->SetWalk(false);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
me->SetWalk(true);
|
||||
break;
|
||||
|
||||
case 30:
|
||||
if (player->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_ESCAPE_FROM_THE_CATACOMBS, me);
|
||||
break;
|
||||
|
||||
case 32:
|
||||
me->SetOrientation(2.978281f);
|
||||
DoScriptText(SAY_END1, me, player);
|
||||
break;
|
||||
|
||||
case 33:
|
||||
me->SetOrientation(5.858011f);
|
||||
DoScriptText(SAY_END2, me, player);
|
||||
Unit* CaptainHelios = me->FindNearestCreature(NPC_CAPTAIN_HELIOS, 50);
|
||||
if (CaptainHelios)
|
||||
DoScriptText(SAY_CAPTAIN_ANSWER, CaptainHelios, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
{
|
||||
m_uiPostEventTimer = 3000;
|
||||
|
||||
if (Unit* player = GetPlayerForEscort())
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
switch (m_uiPostEventCount)
|
||||
{
|
||||
|
||||
@@ -75,25 +75,44 @@ public:
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 1: DoScriptText(SAY_START, me, player);break;
|
||||
case 13:
|
||||
DoScriptText(SAY_LAST, me, player);
|
||||
player->GroupEventHappens(QUEST_ESCORTING, me); break;
|
||||
case 14: DoScriptText(SAY_THANKS, me, player); break;
|
||||
case 15: {
|
||||
Unit* Rane = me->FindNearestCreature(NPC_RANE, 20);
|
||||
if (Rane)
|
||||
case 1:
|
||||
DoScriptText(SAY_START, me, player);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
DoScriptText(SAY_LAST, me, player);
|
||||
player->GroupEventHappens(QUEST_ESCORTING, me);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
DoScriptText(SAY_THANKS, me, player);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (Unit* Rane = me->FindNearestCreature(NPC_RANE, 20))
|
||||
DoScriptText(SAY_RANE, Rane);
|
||||
break;}
|
||||
case 16: DoScriptText(SAY_ANSWER, me); break;
|
||||
case 17: DoScriptText(SAY_MOVE_QUINN, me); break;
|
||||
case 24: DoScriptText(SAY_GREETINGS, me); break;
|
||||
case 25: {
|
||||
Unit* Quinn = me->FindNearestCreature(NPC_QUINN, 20);
|
||||
if (Quinn)
|
||||
break;
|
||||
|
||||
case 16:
|
||||
DoScriptText(SAY_ANSWER, me);
|
||||
break;
|
||||
|
||||
case 17:
|
||||
DoScriptText(SAY_MOVE_QUINN, me);
|
||||
break;
|
||||
|
||||
case 24:
|
||||
DoScriptText(SAY_GREETINGS, me);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
if (Unit* Quinn = me->FindNearestCreature(NPC_QUINN, 20))
|
||||
DoScriptText(SAY_QUINN, Quinn);
|
||||
break;}
|
||||
case 26: DoScriptText(SAY_ON_BYE, me, NULL); break;
|
||||
break;
|
||||
|
||||
case 26:
|
||||
DoScriptText(SAY_ON_BYE, me, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -380,8 +380,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (player)
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
player->FailQuest(QUEST_TOMB_LIGHTBRINGER);
|
||||
}
|
||||
|
||||
|
||||
@@ -243,13 +243,11 @@ public:
|
||||
break;
|
||||
case 44:
|
||||
DoScriptText(SAY_END, me, player);
|
||||
{
|
||||
if (player)
|
||||
player->GroupEventHappens(QUEST_DEFIAS_BROTHERHOOD, me);
|
||||
}
|
||||
player->GroupEventHappens(QUEST_DEFIAS_BROTHERHOOD, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2), me, who);
|
||||
|
||||
@@ -123,9 +123,7 @@ class example_escort : public CreatureScript
|
||||
{
|
||||
// not a likely case, code here for the sake of example
|
||||
if (killer == me)
|
||||
{
|
||||
DoScriptText(SAY_DEATH_1, me, player);
|
||||
}
|
||||
else
|
||||
DoScriptText(SAY_DEATH_2, me, player);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
case 45:
|
||||
DoScriptText(SAY_WIN, me, player);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
if (player->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_WILLIX_THE_IMPORTER, me);
|
||||
break;
|
||||
case 46:
|
||||
|
||||
@@ -100,8 +100,7 @@ class npc_torek : public CreatureScript
|
||||
case 20:
|
||||
DoScriptText(SAY_WIN, me, player);
|
||||
Completed = true;
|
||||
if (player)
|
||||
player->GroupEventHappens(QUEST_TOREK_ASSULT, me);
|
||||
player->GroupEventHappens(QUEST_TOREK_ASSULT, me);
|
||||
break;
|
||||
case 21:
|
||||
Talk(SAY_END, player->GetGUID());
|
||||
@@ -177,47 +176,41 @@ class npc_torek : public CreatureScript
|
||||
class npc_ruul_snowhoof : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
npc_ruul_snowhoof()
|
||||
: CreatureScript("npc_ruul_snowhoof")
|
||||
{
|
||||
}
|
||||
npc_ruul_snowhoof() : CreatureScript("npc_ruul_snowhoof") { }
|
||||
|
||||
struct npc_ruul_snowhoofAI : public npc_escortAI
|
||||
{
|
||||
npc_ruul_snowhoofAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
npc_ruul_snowhoofAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: {
|
||||
case 0:
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20);
|
||||
if (Cage)
|
||||
if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20))
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
break;}
|
||||
case 13:
|
||||
break;
|
||||
|
||||
case 13:
|
||||
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(3926, 3444.218994f, -587.835327f, 175.380600f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000);
|
||||
break;
|
||||
case 19:
|
||||
|
||||
case 19:
|
||||
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(3926, 3503.682373f, -489.393799f, 186.629684f, 4.349232f, TEMPSUMMON_DEAD_DESPAWN, 60000);
|
||||
break;
|
||||
|
||||
case 21:{
|
||||
if (player)
|
||||
player->GroupEventHappens(QUEST_FREEDOM_TO_RUUL, me);
|
||||
|
||||
break; }
|
||||
case 21:
|
||||
player->GroupEventHappens(QUEST_FREEDOM_TO_RUUL, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,12 +323,10 @@ class npc_muglash : public CreatureScript
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
if (player)
|
||||
DoScriptText(SAY_MUG_START2, me, player);
|
||||
DoScriptText(SAY_MUG_START2, me, player);
|
||||
break;
|
||||
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))
|
||||
{
|
||||
@@ -345,9 +336,7 @@ class npc_muglash : public CreatureScript
|
||||
break;
|
||||
case 25:
|
||||
DoScriptText(SAY_MUG_GRATITUDE, me);
|
||||
|
||||
if (player)
|
||||
player->GroupEventHappens(QUEST_VORSHA, me);
|
||||
player->GroupEventHappens(QUEST_VORSHA, me);
|
||||
break;
|
||||
case 26:
|
||||
DoScriptText(SAY_MUG_PATROL, me);
|
||||
@@ -378,14 +367,9 @@ class npc_muglash : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
if (player)
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
player->FailQuest(QUEST_VORSHA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DoWaveSummon()
|
||||
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
break;
|
||||
case 15:
|
||||
if (player)
|
||||
player->GroupEventHappens(QUEST_RETURN_TO_VAHLARRIEL, me);
|
||||
player->GroupEventHappens(QUEST_RETURN_TO_VAHLARRIEL, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -249,8 +249,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (player)
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
player->FailQuest(QUEST_RETURN_TO_VAHLARRIEL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -641,9 +641,9 @@ public:
|
||||
DoScriptText(SAY_QUEST_COMPLETE, me, player);
|
||||
me->SetSpeed(MOVE_RUN, 1.2f, true);
|
||||
me->SetWalk(false);
|
||||
if (player && player->GetQuestStatus(QUEST_STINKYS_ESCAPE_H))
|
||||
if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_H))
|
||||
player->GroupEventHappens(QUEST_STINKYS_ESCAPE_H, me);
|
||||
if (player && player->GetQuestStatus(QUEST_STINKYS_ESCAPE_A))
|
||||
if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_A))
|
||||
player->GroupEventHappens(QUEST_STINKYS_ESCAPE_A, me);
|
||||
break;
|
||||
case 39:
|
||||
@@ -663,10 +663,11 @@ public:
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING) && player)
|
||||
if (player && HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_H))
|
||||
player->FailQuest(QUEST_STINKYS_ESCAPE_H);
|
||||
|
||||
if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_A))
|
||||
player->FailQuest(QUEST_STINKYS_ESCAPE_A);
|
||||
}
|
||||
|
||||
@@ -154,9 +154,7 @@ public:
|
||||
DoScriptText(SAY_OOX_END, me);
|
||||
// Award quest credit
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
player->GroupEventHappens(QUEST_RESCUE_OOX22FE, me);
|
||||
}
|
||||
player->GroupEventHappens(QUEST_RESCUE_OOX22FE, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,17 +123,18 @@ public:
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 16:
|
||||
DoScriptText(SAY_AMBUSH, me);
|
||||
me->SummonCreature(NPC_GRIMTOTEM_BRUTE, -48.53f, -503.34f, -46.31f, 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);
|
||||
break;
|
||||
case 18: me->SetInFront(player);
|
||||
DoScriptText(SAY_END, me, player);
|
||||
if (player)
|
||||
case 16:
|
||||
DoScriptText(SAY_AMBUSH, me);
|
||||
me->SummonCreature(NPC_GRIMTOTEM_BRUTE, -48.53f, -503.34f, -46.31f, 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);
|
||||
break;
|
||||
|
||||
case 18:
|
||||
me->SetInFront(player);
|
||||
DoScriptText(SAY_END, me, player);
|
||||
player->GroupEventHappens(QUEST_PROTECT_KAYA, me);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -435,7 +435,8 @@ public:
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i) {
|
||||
switch (i)
|
||||
{
|
||||
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, -8355.96f, -4447.79f, 10.10f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
@@ -453,11 +454,8 @@ public:
|
||||
break;
|
||||
|
||||
case 86:
|
||||
if (player)
|
||||
{
|
||||
DoScriptText(SAY_OOX_END, me);
|
||||
player->GroupEventHappens(Q_OOX17, me);
|
||||
}
|
||||
DoScriptText(SAY_OOX_END, me);
|
||||
player->GroupEventHappens(Q_OOX17, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -474,7 +472,6 @@ public:
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/*####
|
||||
|
||||
@@ -595,11 +595,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (uiPointId)
|
||||
{
|
||||
case 0:
|
||||
|
||||
@@ -104,8 +104,7 @@ public:
|
||||
break;
|
||||
case 55:
|
||||
DoScriptText(SAY_FINISH, me, player);
|
||||
if (player)
|
||||
player->GroupEventHappens(QUEST_CHASING_AME, me);
|
||||
player->GroupEventHappens(QUEST_CHASING_AME, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1876,8 +1876,7 @@ public:
|
||||
me->SetPhaseMask(1, true);
|
||||
DoScriptText(SAY_5, me);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
if (player)
|
||||
player->GroupEventHappens(QUEST_ESCAPING_THE_MIST, me);
|
||||
player->GroupEventHappens(QUEST_ESCAPING_THE_MIST, me);
|
||||
SetRun(true);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ public:
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 9:
|
||||
|
||||
@@ -102,6 +102,7 @@ public:
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
@@ -109,8 +110,7 @@ public:
|
||||
SetRun(true);
|
||||
break;
|
||||
case 23:
|
||||
if (player)
|
||||
player->GroupEventHappens(QUEST_TRAIL_OF_FIRE, me);
|
||||
player->GroupEventHappens(QUEST_TRAIL_OF_FIRE, me);
|
||||
me->DespawnOrUnsummon();
|
||||
break;
|
||||
case 5:
|
||||
|
||||
@@ -113,8 +113,8 @@ public:
|
||||
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_FORTUNATE_MISUNDERSTANDINGS) != QUEST_STATUS_COMPLETE)
|
||||
player->FailQuest(QUEST_FORTUNATE_MISUNDERSTANDINGS);
|
||||
if (player->GetQuestStatus(QUEST_FORTUNATE_MISUNDERSTANDINGS) != QUEST_STATUS_COMPLETE)
|
||||
player->FailQuest(QUEST_FORTUNATE_MISUNDERSTANDINGS);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -401,12 +401,12 @@ public:
|
||||
{
|
||||
m_uiChatTimer = 4000;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
if (player)
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
player->FailQuest(QUEST_DISASTER);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,15 +377,18 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 26:
|
||||
DoScriptText(SAY_END_WP_REACHED, me, player);
|
||||
break;
|
||||
case 27:
|
||||
if (player)
|
||||
case 26:
|
||||
DoScriptText(SAY_END_WP_REACHED, me, player);
|
||||
break;
|
||||
|
||||
case 27:
|
||||
player->GroupEventHappens(QUEST_BITTER_DEPARTURE, me);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -910,8 +910,7 @@ public:
|
||||
break;
|
||||
|
||||
case 12:
|
||||
if (player)
|
||||
player->GroupEventHappens(Q_ALMABTRIEB, me);
|
||||
player->GroupEventHappens(Q_ALMABTRIEB, me);
|
||||
if (me->FindNearestCreature(N_THADELL, 30))
|
||||
DoScriptText(SAY_THADELL_1, me); break;
|
||||
case 13:
|
||||
@@ -986,16 +985,14 @@ public:
|
||||
}
|
||||
break;
|
||||
case 36: //return and quest_complete
|
||||
if (player)
|
||||
player->CompleteQuest(QUEST_MARK_V_IS_ALIVE);
|
||||
player->CompleteQuest(QUEST_MARK_V_IS_ALIVE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (player)
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
player->FailQuest(QUEST_MARK_V_IS_ALIVE);
|
||||
}
|
||||
|
||||
|
||||
@@ -1108,7 +1108,6 @@ public:
|
||||
break;
|
||||
case 50:
|
||||
DoScriptText(SAY_WIL_END, me, player);
|
||||
|
||||
player->GroupEventHappens(QUEST_ESCAPE_COILSCAR, me);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -349,9 +349,9 @@ public:
|
||||
case 53: DoScriptText(WHISP18, me, player); break;
|
||||
case 54: DoScriptText(WHISP19, me, player); break;
|
||||
case 55: DoScriptText(WHISP20, me, player); break;
|
||||
case 56: DoScriptText(WHISP21, me, player);
|
||||
if (player)
|
||||
player->GroupEventHappens(10211, me);
|
||||
case 56:
|
||||
DoScriptText(WHISP21, me, player);
|
||||
player->GroupEventHappens(10211, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,29 +470,40 @@ public:
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 10);
|
||||
if (Cage)
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
break;
|
||||
case 2: DoScriptText(SAY_PROGRESS_1, me, player); break;
|
||||
case 5: DoScriptText(SAY_PROGRESS_2, me, player); break;
|
||||
case 6: DoScriptText(SAY_PROGRESS_3, me, player); break;
|
||||
case 29:DoScriptText(SAY_PROGRESS_4, me, player);
|
||||
if (player)
|
||||
{
|
||||
case 0:
|
||||
if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 10))
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
DoScriptText(SAY_PROGRESS_1, me, player);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
DoScriptText(SAY_PROGRESS_2, me, player);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
DoScriptText(SAY_PROGRESS_3, me, player);
|
||||
break;
|
||||
|
||||
case 29:
|
||||
DoScriptText(SAY_PROGRESS_4, me, player);
|
||||
if (player->GetTeam() == ALLIANCE)
|
||||
player->GroupEventHappens(QUEST_EFTW_A, me);
|
||||
else if (player->GetTeam() == HORDE)
|
||||
player->GroupEventHappens(QUEST_EFTW_H, me);
|
||||
}
|
||||
me->SetInFront(player); break;
|
||||
case 30: me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
|
||||
case 31: DoCast(me, SPELL_CAT);
|
||||
me->SetWalk(false);
|
||||
break;
|
||||
me->SetInFront(player);
|
||||
break;
|
||||
|
||||
case 30:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE);
|
||||
break;
|
||||
|
||||
case 31:
|
||||
DoCast(me, SPELL_CAT);
|
||||
me->SetWalk(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -676,7 +687,7 @@ public:
|
||||
me->SummonCreature(NPC_CABAL_SKRIMISHER, -2793.55f, 5412.79f, -34.53f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 11:
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
if (player->GetTypeId() == TYPEID_PLAYER)
|
||||
player->GroupEventHappens(QUEST_ESCAPING_THE_TOMB, me);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user