aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-06-18 11:01:38 +0200
committerKudlaty <none@none>2009-06-18 11:01:38 +0200
commit6f151ca4ea6c64baa5f6c15505ffb9f1a4523494 (patch)
treefd905f0fafb52b656a0b47fc135d90863f0a350f /src
parentce4a4c740af50f2b604725a67d1b1c2e1eeef13b (diff)
Merge [SD2]
r1036 Code cleanup for boss karathress and a few additional in vashj. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
index 79b9c6d3c34..e83498169c2 100644
--- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
+++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
@@ -50,6 +50,8 @@ enum
PHASE_2 = 2,
PHASE_3 = 3,
+ MAX_SHIELD_GEN = 4,
+
SPELL_MULTI_SHOT = 38310,
SPELL_SHOCK_BLAST = 38509,
SPELL_ENTANGLE = 38316,
@@ -113,21 +115,18 @@ const float afShieldGeneratorChannelPos[4][4] =
};
//Lady Vashj AI
-struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI
+struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
{
boss_lady_vashjAI(Creature* pCreature) : ScriptedAI(pCreature)
{
m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData());
- for(uint8 i = 0; i < 4; i++)
- m_auiShieldGeneratorChannel[i] = 0;
-
- Reset();
+ memset(&m_auiShieldGeneratorChannel, 0, sizeof(m_auiShieldGeneratorChannel));
}
ScriptedInstance *m_pInstance; // the instance
- uint64 m_auiShieldGeneratorChannel[4];
+ uint64 m_auiShieldGeneratorChannel[MAX_SHIELD_GEN];
// timers
uint32 m_uiShockBlast_Timer;
@@ -176,7 +175,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI
void RemoveAllShieldGenerators()
{
- for(uint8 i = 0; i < 4; i++)
+ for(uint8 i = 0; i < MAX_SHIELD_GEN; i++)
{
if (Unit* pTemp = Unit::GetUnit(*m_creature,m_auiShieldGeneratorChannel[i]))
{
@@ -211,7 +210,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI
{
m_creature->RemoveAllAuras();
- for(uint8 i = 0; i < 4; i++)
+ for(uint8 i = 0; i < MAX_SHIELD_GEN; i++)
{
if (Creature* pCreature = m_creature->SummonCreature(NPC_SHIELD_GENERATOR, afShieldGeneratorChannelPos[i][0], afShieldGeneratorChannelPos[i][1], afShieldGeneratorChannelPos[i][2], afShieldGeneratorChannelPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0))
m_auiShieldGeneratorChannel[i] = pCreature->GetGUID();
@@ -492,13 +491,12 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI
//Enchanted Elemental
//If one of them reaches Vashj he will increase her damage done by 5%.
-struct MANGOS_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
+struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
{
mob_enchanted_elementalAI(Creature* pCreature) : ScriptedAI(pCreature)
{
m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData());
SetCombatMovement(false);
- Reset();
}
ScriptedInstance *m_pInstance; // the instance
@@ -528,13 +526,12 @@ struct MANGOS_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
//Tainted Elemental
//This mob has 7,900 life, doesn't move, and shoots Poison Bolts at one person anywhere in the area, doing 3,000 nature damage and placing a posion doing 2,000 damage every 2 seconds. He will switch targets often, or sometimes just hang on a single player, but there is nothing you can do about it except heal the damage and kill the Tainted Elemental
-struct MANGOS_DLL_DECL mob_tainted_elementalAI : public ScriptedAI
+struct TRINITY_DLL_DECL mob_tainted_elementalAI : public ScriptedAI
{
mob_tainted_elementalAI(Creature* pCreature) : ScriptedAI(pCreature)
{
m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData());
SetCombatMovement(false);
- Reset();
}
ScriptedInstance* m_pInstance; // the instance
@@ -567,12 +564,11 @@ struct MANGOS_DLL_DECL mob_tainted_elementalAI : public ScriptedAI
//Toxic Sporebat
//Toxic Spores: Used in m_uiPhase 3 by the Spore Bats, it creates a contaminated green patch of ground, dealing about 2775-3225 nature damage every second to anyone who stands in it.
-struct MANGOS_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI
+struct TRINITY_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI
{
mob_toxic_sporebatAI(Creature* pCreature) : ScriptedAI(pCreature)
{
m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData());
- Reset();
}
ScriptedInstance* m_pInstance;
@@ -665,12 +661,11 @@ CreatureAI* GetAI_mob_coilfang_strider(Creature* pCreature)
}
//can probably be removed
-struct MANGOS_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI
+struct TRINITY_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI
{
mob_shield_generator_channelAI(Creature* pCreature) : ScriptedAI(pCreature)
{
m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData());
- Reset();
}
ScriptedInstance *m_pInstance; // the instance