diff options
| author | Spp <none@none> | 2010-12-06 02:07:53 +0100 |
|---|---|---|
| committer | Spp <none@none> | 2010-12-06 02:07:53 +0100 |
| commit | 408fce1de69249b82cc042cb31f3fd16983c7e81 (patch) | |
| tree | f4b99f386821e70f155d9aa61b70cfb1f2d3d825 /src/server/scripts/Outland | |
| parent | e226c4ac344d06c7abbd6f04725ced2b33606349 (diff) | |
Core: Some optimizations
- Declare some functions const
- Fix some mem leak
- Fix some resource leak
- Remove unused variables and functions
- Remove duplicate functions
- Reduce the scope of some variables
- Remove unused file
--HG--
branch : trunk
Diffstat (limited to 'src/server/scripts/Outland')
| -rw-r--r-- | src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 93c91f9b4c1..f3970a1665e 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -492,8 +492,7 @@ public: //EnchantedElemental_Timer if (EnchantedElemental_Timer <= diff) { - Creature *Elemental; - Elemental = me->SummonCreature(ENCHANTED_ELEMENTAL, ElementPos[EnchantedElemental_Pos][0], ElementPos[EnchantedElemental_Pos][1], ElementPos[EnchantedElemental_Pos][2], ElementPos[EnchantedElemental_Pos][3], TEMPSUMMON_CORPSE_DESPAWN, 0); + me->SummonCreature(ENCHANTED_ELEMENTAL, ElementPos[EnchantedElemental_Pos][0], ElementPos[EnchantedElemental_Pos][1], ElementPos[EnchantedElemental_Pos][2], ElementPos[EnchantedElemental_Pos][3], TEMPSUMMON_CORPSE_DESPAWN, 0); if (EnchantedElemental_Pos == 7) EnchantedElemental_Pos = 0; @@ -506,9 +505,8 @@ public: //TaintedElemental_Timer if (TaintedElemental_Timer <= diff) { - Creature *Tain_Elemental; uint32 pos = rand()%8; - Tain_Elemental = me->SummonCreature(TAINTED_ELEMENTAL, ElementPos[pos][0], ElementPos[pos][1], ElementPos[pos][2], ElementPos[pos][3], TEMPSUMMON_DEAD_DESPAWN, 0); + me->SummonCreature(TAINTED_ELEMENTAL, ElementPos[pos][0], ElementPos[pos][1], ElementPos[pos][2], ElementPos[pos][3], TEMPSUMMON_DEAD_DESPAWN, 0); TaintedElemental_Timer = 120000; } else TaintedElemental_Timer -= diff; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index 670230c1eda..36d8df38744 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -312,7 +312,7 @@ public: } else WaterboltTimer -= diff; } - if (!UpdateCombatState()) + if (!UpdateVictim()) return; DoMeleeAttackIfReady(); |
