Core/Script: Code style and remove unused core.

Signed-off-by: Gyx <[email protected]>
This commit is contained in:
Gyx
2012-03-28 15:15:48 +08:00
parent e050945c91
commit a20fa23ea6
27 changed files with 193 additions and 192 deletions
+3 -6
View File
@@ -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;
}
}
+31 -20
View File
@@ -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;
}