diff options
author | Gyx <2359980687@qq.com> | 2012-03-17 17:54:48 +0800 |
---|---|---|
committer | Gyx <2359980687@qq.com> | 2012-03-17 17:54:48 +0800 |
commit | 5cb16b65fc90920513d9df969dc262e60dae1116 (patch) | |
tree | b0ef38db596f5f20a58044eb3efdbc3630d29dc5 /src/server/scripts/EasternKingdoms | |
parent | 7877eae6ba00d3072eb020a045028e0c825a3831 (diff) |
Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
4 files changed, 17 insertions, 16 deletions
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index 0d473a5adf1..6c6b0647c5f 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -45,12 +45,12 @@ public: player->GetSession()->SendNotification("Instance script not initialized"); return true; } + if (instance->GetData(EVENT_STATE) != CANNON_NOT_USED) return false; + if (targets.GetGOTarget() && targets.GetGOTarget()->GetEntry() == GO_DEFIAS_CANNON) - { instance->SetData(EVENT_STATE, CANNON_GUNPOWDER_USED); - } player->DestroyItemCount(item->GetEntry(), 1, true); return true; diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 505bf2cbf5c..8918bca637e 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -578,7 +578,8 @@ public: temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[16].x, LightofDawnLoc[16].y, LightofDawnLoc[16].z); } JumpToNextStep(10000); - } break; + } + break; case 4: DoScriptText(SAY_LIGHT_OF_DAWN27, me); me->SetStandState(UNIT_STAND_STATE_KNEEL); @@ -938,7 +939,7 @@ public: case 33: // Darion supports to jump to lich king here if (Unit::GetCreature(*me, uiLichKingGUID)) DoCast(me, SPELL_MOGRAINE_CHARGE); // jumping charge - // doesn't make it looks well, so workarounds, Darion charges, looks better + // doesn't make it looks well, so workarounds, Darion charges, looks better me->SetSpeed(MOVE_RUN, 3.0f); me->SetWalk(false); SetHoldState(false); @@ -1309,7 +1310,6 @@ public: case 71: //if (GameObject* go = me->GetMap()->GetGameObject(uiDawnofLightGUID)) // Turn off dawn of light // go->SetPhaseMask(0, true); - { Map* map = me->GetMap(); // search players with in 50 yards for quest credit Map::PlayerList const &PlayerList = map->GetPlayers(); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index a5eb76545ee..7922d5fbc24 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -209,9 +209,7 @@ class boss_akilzon : public CreatureScript for (std::list<Unit*>::const_iterator i = tempUnitMap.begin(); i != tempUnitMap.end(); ++i) { if (!Cloud->IsWithinDist(*i, 6, false)) - { Cloud->CastCustomSpell(*i, 43137, &bp0, NULL, NULL, true, 0, 0, me->GetGUID()); - } } // visual float x, y, z; @@ -311,7 +309,8 @@ class boss_akilzon : public CreatureScript isRaining = true; } - if (ElectricalStorm_Timer <= diff) { + if (ElectricalStorm_Timer <= diff) + { Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true); if (!target) { @@ -390,15 +389,11 @@ class boss_akilzon : public CreatureScript class mob_akilzon_eagle : public CreatureScript { public: - - mob_akilzon_eagle() - : CreatureScript("mob_akilzon_eagle") - { - } + mob_akilzon_eagle() : CreatureScript("mob_akilzon_eagle") { } struct mob_akilzon_eagleAI : public ScriptedAI { - mob_akilzon_eagleAI(Creature* creature) : ScriptedAI(creature) {} + mob_akilzon_eagleAI(Creature* creature) : ScriptedAI(creature) { } uint32 EagleSwoop_Timer; bool arrived; @@ -412,7 +407,10 @@ class mob_akilzon_eagle : public CreatureScript me->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY); } - void EnterCombat(Unit* /*who*/) {DoZoneInCombat();} + void EnterCombat(Unit* /*who*/) + { + DoZoneInCombat(); + } void MoveInLineOfSight(Unit* /*who*/) {} diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 683bed46bb0..fa0627df5f3 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -186,7 +186,10 @@ struct boss_hexlord_addAI : public ScriptedAI void Reset() {} - void EnterCombat(Unit* /*who*/) {DoZoneInCombat();} + void EnterCombat(Unit* /*who*/) + { + DoZoneInCombat(); + } void UpdateAI(const uint32 /*diff*/) { |