diff options
author | Supabad <none@none> | 2010-08-07 22:45:09 +0200 |
---|---|---|
committer | Supabad <none@none> | 2010-08-07 22:45:09 +0200 |
commit | 79b0567a747bf9f261630f5b32a27dd2890f80f7 (patch) | |
tree | 904382ab05f8ccec2c798be2dae5b821bcc5abe7 | |
parent | 9e1695a9c5ee85e3378dd0507982d0074ea1a82a (diff) |
convert Hellfire Ramparts to new format
--HG--
branch : trunk
4 files changed, 731 insertions, 640 deletions
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp index 9e07aa06f45..a191d30a80f 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp @@ -25,184 +25,208 @@ EndScriptData */ #include "ScriptPCH.h" -#define SAY_AGGRO_1 -1543009 -#define SAY_AGGRO_2 -1543010 -#define SAY_AGGRO_3 -1543011 -#define SAY_SUMMON -1543012 -#define SAY_CURSE -1543013 -#define SAY_KILL_1 -1543014 -#define SAY_DIE -1543015 -#define SAY_WIPE -1543016 - -#define SPELL_ORBITAL_STRIKE 30637 -#define SPELL_SHADOW_WHIP 30638 -#define SPELL_TREACHEROUS_AURA 30695 -#define H_SPELL_BANE_OF_TREACHERY 37566 -#define SPELL_DEMONIC_SHIELD 31901 -#define SPELL_SHADOW_BOLT 30686 -#define H_SPELL_SHADOW_BOLT 39297 -#define SPELL_SUMMON_FIENDISH_HOUND 30707 - -struct boss_omor_the_unscarredAI : public ScriptedAI +enum eSays +{ + SAY_AGGRO_1 = -1543009, + SAY_AGGRO_2 = -1543010, + SAY_AGGRO_3 = -1543011, + SAY_SUMMON = -1543012, + SAY_CURSE = -1543013, + SAY_KILL_1 = -1543014, + SAY_DIE = -1543015, + SAY_WIPE = -1543016, +}; + +enum eSpells +{ + SPELL_ORBITAL_STRIKE = 30637, + SPELL_SHADOW_WHIP = 30638, + SPELL_TREACHEROUS_AURA = 30695, + H_SPELL_BANE_OF_TREACHERY = 37566, + SPELL_DEMONIC_SHIELD = 31901, + SPELL_SHADOW_BOLT = 30686, + H_SPELL_SHADOW_BOLT = 39297, + SPELL_SUMMON_FIENDISH_HOUND= 30707, +}; + +class boss_omor_the_unscarred : public CreatureScript { - boss_omor_the_unscarredAI(Creature *c) : ScriptedAI(c) - { - SetCombatMovement(false); - } - - uint32 OrbitalStrike_Timer; - uint32 ShadowWhip_Timer; - uint32 Aura_Timer; - uint32 DemonicShield_Timer; - uint32 Shadowbolt_Timer; - uint32 Summon_Timer; - uint32 SummonedCount; - uint64 PlayerGUID; - bool CanPullBack; - - void Reset() - { - DoScriptText(SAY_WIPE, me); - - OrbitalStrike_Timer = 25000; - ShadowWhip_Timer = 2000; - Aura_Timer = 10000; - DemonicShield_Timer = 1000; - Shadowbolt_Timer = 2000; - Summon_Timer = 10000; - SummonedCount = 0; - PlayerGUID = 0; - CanPullBack = false; - } - - void EnterCombat(Unit * /*who*/) - { - DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me); - } - - void KilledUnit(Unit* /*victim*/) - { - if (rand()%2) - return; - - DoScriptText(SAY_KILL_1, me); - } - - void JustSummoned(Creature* summoned) - { - DoScriptText(SAY_SUMMON, me); - - if (Unit* random = SelectUnit(SELECT_TARGET_RANDOM,0)) - summoned->AI()->AttackStart(random); - - ++SummonedCount; - } - - void JustDied(Unit* /*Killer*/) - { - DoScriptText(SAY_DIE, me); - } - - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; - - //only two may be wrong, perhaps increase timer and spawn periodically instead. - if (SummonedCount < 2) + public: + + boss_omor_the_unscarred() + : CreatureScript("boss_omor_the_unscarred") { - if (Summon_Timer <= diff) - { - me->InterruptNonMeleeSpells(false); - DoCast(me, SPELL_SUMMON_FIENDISH_HOUND); - Summon_Timer = 15000+rand()%15000; - } else Summon_Timer -= diff; } - if (CanPullBack) + struct boss_omor_the_unscarredAI : public ScriptedAI { - if (ShadowWhip_Timer <= diff) + boss_omor_the_unscarredAI(Creature* pCreature) : ScriptedAI(pCreature) { - if (Player* temp = Unit::GetPlayer(*me, PlayerGUID)) - { - //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) - if (temp->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)) - { - me->InterruptNonMeleeSpells(false); - DoCast(temp, SPELL_SHADOW_WHIP); - } - } - PlayerGUID = 0; + SetCombatMovement(false); + } + + uint32 OrbitalStrike_Timer; + uint32 ShadowWhip_Timer; + uint32 Aura_Timer; + uint32 DemonicShield_Timer; + uint32 Shadowbolt_Timer; + uint32 Summon_Timer; + uint32 SummonedCount; + uint64 PlayerGUID; + bool CanPullBack; + + void Reset() + { + DoScriptText(SAY_WIPE, me); + + OrbitalStrike_Timer = 25000; ShadowWhip_Timer = 2000; + Aura_Timer = 10000; + DemonicShield_Timer = 1000; + Shadowbolt_Timer = 2000; + Summon_Timer = 10000; + SummonedCount = 0; + PlayerGUID = 0; CanPullBack = false; - } else ShadowWhip_Timer -= diff; - } - else if (OrbitalStrike_Timer <= diff) - { - Unit* temp = NULL; - if (me->IsWithinMeleeRange(me->getVictim())) - temp = me->getVictim(); - else temp = SelectUnit(SELECT_TARGET_RANDOM,0); + } + + void EnterCombat(Unit * /*who*/) + { + DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me); + } - if (temp && temp->GetTypeId() == TYPEID_PLAYER) + void KilledUnit(Unit* /*victim*/) { - DoCast(temp, SPELL_ORBITAL_STRIKE); - OrbitalStrike_Timer = 14000+rand()%2000; - PlayerGUID = temp->GetGUID(); + if (rand()%2) + return; - if (PlayerGUID) - CanPullBack = true; + DoScriptText(SAY_KILL_1, me); } - } else OrbitalStrike_Timer -= diff; - if ((me->GetHealth()*100) / me->GetMaxHealth() < 20) - { - if (DemonicShield_Timer <= diff) + void JustSummoned(Creature* summoned) { - DoCast(me, SPELL_DEMONIC_SHIELD); - DemonicShield_Timer = 15000; - } else DemonicShield_Timer -= diff; - } + DoScriptText(SAY_SUMMON, me); - if (Aura_Timer <= diff) - { - DoScriptText(SAY_CURSE, me); + if (Unit* random = SelectUnit(SELECT_TARGET_RANDOM,0)) + summoned->AI()->AttackStart(random); - if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + ++SummonedCount; + } + + void JustDied(Unit* /*Killer*/) { - DoCast(pTarget, SPELL_TREACHEROUS_AURA); - Aura_Timer = 8000+rand()%8000; + DoScriptText(SAY_DIE, me); } - } else Aura_Timer -= diff; - if (Shadowbolt_Timer <= diff) - { - if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + void UpdateAI(const uint32 diff) { - if (pTarget) - pTarget = me->getVictim(); + if (!UpdateVictim()) + return; - DoCast(pTarget, SPELL_SHADOW_BOLT); - Shadowbolt_Timer = 4000+rand()%2500; + //only two may be wrong, perhaps increase timer and spawn periodically instead. + if (SummonedCount < 2) + { + if (Summon_Timer <= diff) + { + me->InterruptNonMeleeSpells(false); + DoCast(me, SPELL_SUMMON_FIENDISH_HOUND); + Summon_Timer = 15000+rand()%15000; + } + else + Summon_Timer -= diff; + } + + if (CanPullBack) + { + if (ShadowWhip_Timer <= diff) + { + if (Player* temp = Unit::GetPlayer(*me, PlayerGUID)) + { + //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) + if (temp->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)) + { + me->InterruptNonMeleeSpells(false); + DoCast(temp, SPELL_SHADOW_WHIP); + } + } + PlayerGUID = 0; + ShadowWhip_Timer = 2000; + CanPullBack = false; + } + else + ShadowWhip_Timer -= diff; + } + else + if (OrbitalStrike_Timer <= diff) + { + Unit* temp = NULL; + if (me->IsWithinMeleeRange(me->getVictim())) + temp = me->getVictim(); + else temp = SelectUnit(SELECT_TARGET_RANDOM,0); + + if (temp && temp->GetTypeId() == TYPEID_PLAYER) + { + DoCast(temp, SPELL_ORBITAL_STRIKE); + OrbitalStrike_Timer = 14000+rand()%2000; + PlayerGUID = temp->GetGUID(); + + if (PlayerGUID) + CanPullBack = true; + } + } + else + OrbitalStrike_Timer -= diff; + + if ((me->GetHealth()*100) / me->GetMaxHealth() < 20) + { + if (DemonicShield_Timer <= diff) + { + DoCast(me, SPELL_DEMONIC_SHIELD); + DemonicShield_Timer = 15000; + } + else + DemonicShield_Timer -= diff; + } + + if (Aura_Timer <= diff) + { + DoScriptText(SAY_CURSE, me); + + if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(pTarget, SPELL_TREACHEROUS_AURA); + Aura_Timer = 8000+rand()%8000; + } + } + else + Aura_Timer -= diff; + + if (Shadowbolt_Timer <= diff) + { + if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + if (pTarget) + pTarget = me->getVictim(); + + DoCast(pTarget, SPELL_SHADOW_BOLT); + Shadowbolt_Timer = 4000+rand()%2500; + } + } + else + Shadowbolt_Timer -= diff; + + DoMeleeAttackIfReady(); } - } else Shadowbolt_Timer -= diff; + }; - DoMeleeAttackIfReady(); - } + CreatureAI* GetAI(Creature* Creature) const + { + return new boss_omor_the_unscarredAI (Creature); + } }; -CreatureAI* GetAI_boss_omor_the_unscarredAI(Creature* pCreature) -{ - return new boss_omor_the_unscarredAI (pCreature); -} - void AddSC_boss_omor_the_unscarred() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_omor_the_unscarred"; - newscript->GetAI = &GetAI_boss_omor_the_unscarredAI; - newscript->RegisterSelf(); + new boss_omor_the_unscarred(); } diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 888b3cb6f4d..77fd16edce2 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -50,6 +50,7 @@ enum eUnits ENTRY_REINFORCED_FEL_IRON_CHEST = 185168, ENTRY_REINFORCED_FEL_IRON_CHEST_H = 185169, }; + enum eSays { SAY_INTRO = -1543017, @@ -70,404 +71,443 @@ const float VazrudenRing[2][3] = {-1377, 1760, 112} }; -struct boss_nazanAI : public ScriptedAI +class boss_nazan : public CreatureScript { - boss_nazanAI(Creature* pCreature) : ScriptedAI(pCreature) - { - VazrudenGUID = 0; - flight = true; - } - - uint32 Fireball_Timer; - uint32 ConeOfFire_Timer; - uint32 BellowingRoar_Timer; - uint32 Fly_Timer; - uint32 Turn_Timer; - bool flight; - uint64 VazrudenGUID; - SpellEntry *liquid_fire; - - void Reset() - { - Fireball_Timer = 4000; - Fly_Timer = 45000; - Turn_Timer = 0; - } - - void EnterCombat(Unit* /*who*/) {} - - void JustSummoned(Creature *summoned) - { - if (summoned && summoned->GetEntry() == ENTRY_LIQUID_FIRE) + public: + + boss_nazan() + : CreatureScript("boss_nazan") { - summoned->SetLevel(me->getLevel()); - summoned->setFaction(me->getFaction()); - summoned->CastSpell(summoned, DUNGEON_MODE(SPELL_SUMMON_LIQUID_FIRE,SPELL_SUMMON_LIQUID_FIRE_H),true); - summoned->CastSpell(summoned,SPELL_FIRE_NOVA_VISUAL,true); } - } - void SpellHitTarget(Unit *pTarget, const SpellEntry* entry) - { - if (pTarget && entry->Id == uint32(SPELL_FIREBALL)) - me->SummonCreature(ENTRY_LIQUID_FIRE,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),pTarget->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,30000); - } + struct boss_nazanAI : public ScriptedAI + { + boss_nazanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + VazrudenGUID = 0; + flight = true; + } - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; + uint32 Fireball_Timer; + uint32 ConeOfFire_Timer; + uint32 BellowingRoar_Timer; + uint32 Fly_Timer; + uint32 Turn_Timer; + bool flight; + uint64 VazrudenGUID; + SpellEntry *liquid_fire; - if (Fireball_Timer <= diff) - { - if (Unit* pVictim = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(pVictim, DUNGEON_MODE(SPELL_FIREBALL, SPELL_FIREBALL_H), true); - Fireball_Timer = urand(4000,7000); - } else Fireball_Timer -= diff; + void Reset() + { + Fireball_Timer = 4000; + Fly_Timer = 45000; + Turn_Timer = 0; + } - if (flight) // phase 1 - the flight - { - Creature *Vazruden = Unit::GetCreature(*me,VazrudenGUID); - if (Fly_Timer < diff || !(Vazruden && Vazruden->isAlive() && (Vazruden->GetHealth()*5 > Vazruden->GetMaxHealth()))) + void EnterCombat(Unit* /*who*/) {} + + void JustSummoned(Creature *summoned) { - flight = false; - BellowingRoar_Timer = 6000; - ConeOfFire_Timer = 12000; - me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); - me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); - me->GetMotionMaster()->Clear(); - if (Unit* pVictim = SelectUnit(SELECT_TARGET_NEAREST,0)) - me->AI()->AttackStart(pVictim); - DoStartMovement(me->getVictim()); - DoScriptText(EMOTE, me); - return; - } else Fly_Timer -= diff; - - if (Turn_Timer <= diff) + if (summoned && summoned->GetEntry() == ENTRY_LIQUID_FIRE) + { + summoned->SetLevel(me->getLevel()); + summoned->setFaction(me->getFaction()); + summoned->CastSpell(summoned, DUNGEON_MODE(SPELL_SUMMON_LIQUID_FIRE,SPELL_SUMMON_LIQUID_FIRE_H),true); + summoned->CastSpell(summoned,SPELL_FIRE_NOVA_VISUAL,true); + } + } + + void SpellHitTarget(Unit *pTarget, const SpellEntry* entry) { - uint32 waypoint = (Fly_Timer/10000)%2; - if (!me->IsWithinDist3d(VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2], 5)) - me->GetMotionMaster()->MovePoint(0,VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2]); - Turn_Timer = 10000; - } else Turn_Timer -= diff; - } - else // phase 2 - land fight - { - if (ConeOfFire_Timer <= diff) + if (pTarget && entry->Id == uint32(SPELL_FIREBALL)) + me->SummonCreature(ENTRY_LIQUID_FIRE,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),pTarget->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,30000); + } + + void UpdateAI(const uint32 diff) { - DoCast(me, DUNGEON_MODE(SPELL_CONE_OF_FIRE, SPELL_CONE_OF_FIRE_H)); - ConeOfFire_Timer = 12000; - Fireball_Timer = 4000; - } else ConeOfFire_Timer -= diff; + if (!UpdateVictim()) + return; - if (IsHeroic()) - if (BellowingRoar_Timer <= diff) + if (Fireball_Timer <= diff) { - DoCast(me, SPELL_BELLOWING_ROAR); - BellowingRoar_Timer = 45000; - } else BellowingRoar_Timer -= diff; + if (Unit* pVictim = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pVictim, DUNGEON_MODE(SPELL_FIREBALL, SPELL_FIREBALL_H), true); + Fireball_Timer = urand(4000,7000); + } + else + Fireball_Timer -= diff; + + if (flight) // phase 1 - the flight + { + Creature *Vazruden = Unit::GetCreature(*me,VazrudenGUID); + if (Fly_Timer < diff || !(Vazruden && Vazruden->isAlive() && (Vazruden->GetHealth()*5 > Vazruden->GetMaxHealth()))) + { + flight = false; + BellowingRoar_Timer = 6000; + ConeOfFire_Timer = 12000; + me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); + me->GetMotionMaster()->Clear(); + if (Unit* pVictim = SelectUnit(SELECT_TARGET_NEAREST,0)) + me->AI()->AttackStart(pVictim); + DoStartMovement(me->getVictim()); + DoScriptText(EMOTE, me); + return; + } + else + Fly_Timer -= diff; + + if (Turn_Timer <= diff) + { + uint32 waypoint = (Fly_Timer/10000)%2; + if (!me->IsWithinDist3d(VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2], 5)) + me->GetMotionMaster()->MovePoint(0,VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2]); + Turn_Timer = 10000; + } + else + Turn_Timer -= diff; + } + else // phase 2 - land fight + { + if (ConeOfFire_Timer <= diff) + { + DoCast(me, DUNGEON_MODE(SPELL_CONE_OF_FIRE, SPELL_CONE_OF_FIRE_H)); + ConeOfFire_Timer = 12000; + Fireball_Timer = 4000; + } + else + ConeOfFire_Timer -= diff; + + if (IsHeroic()) + if (BellowingRoar_Timer <= diff) + { + DoCast(me, SPELL_BELLOWING_ROAR); + BellowingRoar_Timer = 45000; + } + else + BellowingRoar_Timer -= diff; + + DoMeleeAttackIfReady(); + } + } + }; - DoMeleeAttackIfReady(); + CreatureAI* GetAI(Creature* Creature) const + { + return new boss_nazanAI (Creature); } - } }; -struct boss_vazrudenAI : public ScriptedAI +class boss_vazruden : public CreatureScript { - boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature) - { - } - - uint32 Revenge_Timer; - bool WipeSaid; - uint32 UnsummonCheck; - - void Reset() - { - Revenge_Timer = 4000; - UnsummonCheck = 2000; - WipeSaid = false; - } - - void EnterCombat(Unit * /*who*/) - { - DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me); - } - - void KilledUnit(Unit* who) - { - if (who && who->GetEntry() != ENTRY_VAZRUDEN) - DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me); - } - - void JustDied(Unit* who) - { - if (who && who != me) - DoScriptText(SAY_DIE, me); - } - - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) + public: + + boss_vazruden() + : CreatureScript("boss_vazruden") { - if (UnsummonCheck < diff && me->isAlive()) + } + struct boss_vazrudenAI : public ScriptedAI + { + boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature) + { + } + + uint32 Revenge_Timer; + bool WipeSaid; + uint32 UnsummonCheck; + + void Reset() + { + Revenge_Timer = 4000; + UnsummonCheck = 2000; + WipeSaid = false; + } + + void EnterCombat(Unit * /*who*/) + { + DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me); + } + + void KilledUnit(Unit* who) { - if (!WipeSaid) + if (who && who->GetEntry() != ENTRY_VAZRUDEN) + DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me); + } + + void JustDied(Unit* who) + { + if (who && who != me) + DoScriptText(SAY_DIE, me); + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) { - DoScriptText(SAY_WIPE, me); - WipeSaid = true; + if (UnsummonCheck < diff && me->isAlive()) + { + if (!WipeSaid) + { + DoScriptText(SAY_WIPE, me); + WipeSaid = true; + } + me->DisappearAndDie(); + } + else + UnsummonCheck -= diff; + return; } - me->DisappearAndDie(); - } else UnsummonCheck -= diff; - return; - } - if (Revenge_Timer <= diff) + if (Revenge_Timer <= diff) + { + if (Unit *victim = me->getVictim()) + DoCast(victim, DUNGEON_MODE(SPELL_REVENGE,SPELL_REVENGE_H)); + Revenge_Timer = 5000; + } + else + Revenge_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + CreatureAI* GetAI(Creature* Creature) const { - if (Unit *victim = me->getVictim()) - DoCast(victim, DUNGEON_MODE(SPELL_REVENGE,SPELL_REVENGE_H)); - Revenge_Timer = 5000; - } else Revenge_Timer -= diff; - - DoMeleeAttackIfReady(); - } + return new boss_vazrudenAI (Creature); + } }; -struct boss_vazruden_the_heraldAI : public ScriptedAI +class boss_vazruden_the_herald : public CreatureScript { - boss_vazruden_the_heraldAI(Creature* pCreature) : ScriptedAI(pCreature) - { - summoned = false; - sentryDown = false; - NazanGUID = 0; - VazrudenGUID = 0; - } - - uint32 phase; - uint32 waypoint; - uint32 check; - bool sentryDown; - uint64 NazanGUID; - uint64 VazrudenGUID; - bool summoned; - - void Reset() - { - phase = 0; - waypoint = 0; - check = 0; - UnsummonAdds(); - } - - void UnsummonAdds() - { - if (summoned) + public: + + boss_vazruden_the_herald() + : CreatureScript("boss_vazruden_the_herald") + { + } + + struct boss_vazruden_the_heraldAI : public ScriptedAI { - Creature *Nazan = Unit::GetCreature(*me, NazanGUID); - if (!Nazan) - Nazan = me->FindNearestCreature(ENTRY_NAZAN, 5000); - if (Nazan) + boss_vazruden_the_heraldAI(Creature* pCreature) : ScriptedAI(pCreature) { - Nazan->DisappearAndDie(); + summoned = false; + sentryDown = false; NazanGUID = 0; + VazrudenGUID = 0; } - Creature *Vazruden = Unit::GetCreature(*me, VazrudenGUID); - if (!Vazruden) - Vazruden = me->FindNearestCreature(ENTRY_VAZRUDEN, 5000); - if (Vazruden) + uint32 phase; + uint32 waypoint; + uint32 check; + bool sentryDown; + uint64 NazanGUID; + uint64 VazrudenGUID; + bool summoned; + + void Reset() { - Vazruden->DisappearAndDie(); - VazrudenGUID = 0; + phase = 0; + waypoint = 0; + check = 0; + UnsummonAdds(); } - summoned = false; - me->clearUnitState(UNIT_STAT_ROOT); - me->SetVisibility(VISIBILITY_ON); - } - } - void SummonAdds() - { - if (!summoned) - { - if (Creature* Vazruden = me->SummonCreature(ENTRY_VAZRUDEN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000)) - VazrudenGUID = Vazruden->GetGUID(); - if (Creature* Nazan = me->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000)) - NazanGUID = Nazan->GetGUID(); - summoned = true; - me->SetVisibility(VISIBILITY_OFF); - me->addUnitState(UNIT_STAT_ROOT); - } - } + void UnsummonAdds() + { + if (summoned) + { + Creature *Nazan = Unit::GetCreature(*me, NazanGUID); + if (!Nazan) + Nazan = me->FindNearestCreature(ENTRY_NAZAN, 5000); + if (Nazan) + { + Nazan->DisappearAndDie(); + NazanGUID = 0; + } - void EnterCombat(Unit* /*who*/) - { - if (phase == 0) - { - phase = 1; - check = 0; - DoScriptText(SAY_INTRO, me); - } - } - - void JustSummoned(Creature* pSummoned) - { - if (!pSummoned) - return; - Unit* pVictim = me->getVictim(); - if (pSummoned->GetEntry() == ENTRY_NAZAN) - { - CAST_AI(boss_nazanAI, pSummoned->AI())->VazrudenGUID = VazrudenGUID; - pSummoned->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); - pSummoned->SetSpeed(MOVE_FLIGHT, 2.5); - if (pVictim) - AttackStartNoMove(pVictim); - } - else - if (pVictim) - pSummoned->AI()->AttackStart(pVictim); - } - - void SentryDownBy(Unit* pKiller) - { - if (sentryDown) - { - AttackStartNoMove(pKiller); - sentryDown = false; - } - else - sentryDown = true; - } + Creature *Vazruden = Unit::GetCreature(*me, VazrudenGUID); + if (!Vazruden) + Vazruden = me->FindNearestCreature(ENTRY_VAZRUDEN, 5000); + if (Vazruden) + { + Vazruden->DisappearAndDie(); + VazrudenGUID = 0; + } + summoned = false; + me->clearUnitState(UNIT_STAT_ROOT); + me->SetVisibility(VISIBILITY_ON); + } + } - void UpdateAI(const uint32 diff) - { - switch(phase) - { - case 0: // circle around the platform - return; - break; - case 1: // go to the middle and begin the fight - if (check <= diff) + void SummonAdds() { - if (!me->IsWithinDist3d(VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],5)) + if (!summoned) { - me->GetMotionMaster()->Clear(); - me->GetMotionMaster()->MovePoint(0,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2]); - check = 1000; + if (Creature* Vazruden = me->SummonCreature(ENTRY_VAZRUDEN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000)) + VazrudenGUID = Vazruden->GetGUID(); + if (Creature* Nazan = me->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000)) + NazanGUID = Nazan->GetGUID(); + summoned = true; + me->SetVisibility(VISIBILITY_OFF); + me->addUnitState(UNIT_STAT_ROOT); } - else + } + + void EnterCombat(Unit* /*who*/) + { + if (phase == 0) { - SummonAdds(); - phase = 2; + phase = 1; + check = 0; + DoScriptText(SAY_INTRO, me); + } + } + + void JustSummoned(Creature* pSummoned) + { + if (!pSummoned) return; + Unit* pVictim = me->getVictim(); + if (pSummoned->GetEntry() == ENTRY_NAZAN) + { + CAST_AI(boss_nazan::boss_nazanAI, pSummoned->AI())->VazrudenGUID = VazrudenGUID; + pSummoned->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + pSummoned->SetSpeed(MOVE_FLIGHT, 2.5); + if (pVictim) + AttackStartNoMove(pVictim); } - } else check -= diff; - break; - default: // adds do the job now - if (check <= diff) + else + if (pVictim) + pSummoned->AI()->AttackStart(pVictim); + } + + void SentryDownBy(Unit* pKiller) { - Creature *Nazan = Unit::GetCreature(*me, NazanGUID); - Creature *Vazruden = Unit::GetCreature(*me, VazrudenGUID); - if (Nazan && Nazan->isAlive() || Vazruden && Vazruden->isAlive()) + if (sentryDown) { - if (Nazan && Nazan->getVictim() || Vazruden && Vazruden->getVictim()) - return; - else - { - UnsummonAdds(); - EnterEvadeMode(); - return; - } + AttackStartNoMove(pKiller); + sentryDown = false; } else + sentryDown = true; + } + + void UpdateAI(const uint32 diff) + { + switch(phase) { - me->SummonGameObject(DUNGEON_MODE(ENTRY_REINFORCED_FEL_IRON_CHEST, ENTRY_REINFORCED_FEL_IRON_CHEST_H),VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,0,0,0,0,0); - me->SetLootRecipient(NULL); // don't think this is necessary.. - //me->Kill(me); + case 0: // circle around the platform + return; + break; + case 1: // go to the middle and begin the fight + if (check <= diff) + { + if (!me->IsWithinDist3d(VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],5)) + { + me->GetMotionMaster()->Clear(); + me->GetMotionMaster()->MovePoint(0,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2]); + check = 1000; + } + else + { + SummonAdds(); + phase = 2; + return; + } + } + else + check -= diff; + break; + default: // adds do the job now + if (check <= diff) + { + Creature *Nazan = Unit::GetCreature(*me, NazanGUID); + Creature *Vazruden = Unit::GetCreature(*me, VazrudenGUID); + if (Nazan && Nazan->isAlive() || Vazruden && Vazruden->isAlive()) + { + if (Nazan && Nazan->getVictim() || Vazruden && Vazruden->getVictim()) + return; + else + { + UnsummonAdds(); + EnterEvadeMode(); + return; + } + } + else + { + me->SummonGameObject(DUNGEON_MODE(ENTRY_REINFORCED_FEL_IRON_CHEST, ENTRY_REINFORCED_FEL_IRON_CHEST_H),VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,0,0,0,0,0); + me->SetLootRecipient(NULL); // don't think this is necessary.. + //me->Kill(me); + } + check = 2000; + } + else + check -= diff; + break; } - check = 2000; - } else check -= diff; - break; + } + }; + + CreatureAI* GetAI(Creature* Creature) const + { + return new boss_vazruden_the_heraldAI (Creature); } - } }; -struct mob_hellfire_sentryAI : public ScriptedAI +class mob_hellfire_sentry : public CreatureScript { - mob_hellfire_sentryAI(Creature* pCreature) : ScriptedAI(pCreature) {} - - uint32 KidneyShot_Timer; - - void Reset() - { - KidneyShot_Timer = urand(3000,7000); - } + public: - void EnterCombat(Unit* /*who*/) {} - - void JustDied(Unit* who) - { - if (Creature *herald = me->FindNearestCreature(ENTRY_VAZRUDEN_HERALD,150)) - CAST_AI(boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(who); - } - - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; - - if (KidneyShot_Timer <= diff) + mob_hellfire_sentry() + : CreatureScript("mob_hellfire_sentry") + { + } + struct mob_hellfire_sentryAI : public ScriptedAI { - if (Unit *victim = me->getVictim()) - DoCast(victim, SPELL_KIDNEY_SHOT); - KidneyShot_Timer = 20000; - } else KidneyShot_Timer -= diff; + mob_hellfire_sentryAI(Creature* pCreature) : ScriptedAI(pCreature) {} - DoMeleeAttackIfReady(); - } -}; + uint32 KidneyShot_Timer; -CreatureAI* GetAI_boss_vazruden_the_herald(Creature* pCreature) -{ - return new boss_vazruden_the_heraldAI (pCreature); -} + void Reset() + { + KidneyShot_Timer = urand(3000,7000); + } -CreatureAI* GetAI_boss_vazruden(Creature* pCreature) -{ - return new boss_vazrudenAI (pCreature); -} + void EnterCombat(Unit* /*who*/) {} -CreatureAI* GetAI_boss_nazan(Creature* pCreature) -{ - return new boss_nazanAI (pCreature); -} + void JustDied(Unit* who) + { + if (Creature *herald = me->FindNearestCreature(ENTRY_VAZRUDEN_HERALD,150)) + CAST_AI(boss_vazruden_the_herald::boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(who); + } -CreatureAI* GetAI_mob_hellfire_sentry(Creature* pCreature) -{ - return new mob_hellfire_sentryAI (pCreature); -} + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + if (KidneyShot_Timer <= diff) + { + if (Unit *victim = me->getVictim()) + DoCast(victim, SPELL_KIDNEY_SHOT); + KidneyShot_Timer = 20000; + } + else + KidneyShot_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + CreatureAI* GetAI(Creature* Creature) const + { + return new mob_hellfire_sentryAI (Creature); + } +}; void AddSC_boss_vazruden_the_herald() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_vazruden_the_herald"; - newscript->GetAI = &GetAI_boss_vazruden_the_herald; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_vazruden"; - newscript->GetAI = &GetAI_boss_vazruden; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_nazan"; - newscript->GetAI = &GetAI_boss_nazan; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_hellfire_sentry"; - newscript->GetAI = &GetAI_mob_hellfire_sentry; - newscript->RegisterSelf(); + new boss_vazruden_the_herald(); + new boss_vazruden(); + new boss_nazan(); + new mob_hellfire_sentry(); } diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp index 4feb83ec9cd..509650cd5c6 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp @@ -25,134 +25,152 @@ EndScriptData */ #include "ScriptPCH.h" -#define SAY_TAUNT -1543000 -#define SAY_HEAL -1543001 -#define SAY_SURGE -1543002 -#define SAY_AGGRO_1 -1543003 -#define SAY_AGGRO_2 -1543004 -#define SAY_AGGRO_3 -1543005 -#define SAY_KILL_1 -1543006 -#define SAY_KILL_2 -1543007 -#define SAY_DIE -1543008 - -#define SPELL_MORTAL_WOUND 30641 -#define H_SPELL_MORTAL_WOUND 36814 -#define SPELL_SURGE 34645 -#define SPELL_RETALIATION 22857 - -struct boss_watchkeeper_gargolmarAI : public ScriptedAI +enum eSays { - boss_watchkeeper_gargolmarAI(Creature *c) : ScriptedAI(c) - { - } - - uint32 Surge_Timer; - uint32 MortalWound_Timer; - uint32 Retaliation_Timer; - - bool HasTaunted; - bool YelledForHeal; - - void Reset() - { - Surge_Timer = 5000; - MortalWound_Timer = 4000; - Retaliation_Timer = 0; - - HasTaunted = false; - YelledForHeal = false; - } - - void EnterCombat(Unit * /*who*/) - { - DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me); - } - - void MoveInLineOfSight(Unit* who) - { - if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me)) + SAY_TAUNT = -1543000, + SAY_HEAL = -1543001, + SAY_SURGE = -1543002, + SAY_AGGRO_1 = -1543003, + SAY_AGGRO_2 = -1543004, + SAY_AGGRO_3 = -1543005, + SAY_KILL_1 = -1543006, + SAY_KILL_2 = -1543007, + SAY_DIE = -1543008, +}; + +enum eSpells +{ + SPELL_MORTAL_WOUND = 30641, + H_SPELL_MORTAL_WOUND = 36814, + SPELL_SURGE = 34645, + SPELL_RETALIATION = 22857, +}; + +class boss_watchkeeper_gargolmar : public CreatureScript +{ + public: + + boss_watchkeeper_gargolmar() + : CreatureScript("boss_watchkeeper_gargolmar") { - if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) - return; + } - float attackRadius = me->GetAttackDistance(who); - if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who)) - { - //who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(who); - } - else if (!HasTaunted && me->IsWithinDistInMap(who, 60.0f)) + struct boss_watchkeeper_gargolmarAI : public ScriptedAI + { + boss_watchkeeper_gargolmarAI(Creature* pCreature) : ScriptedAI(pCreature) { - DoScriptText(SAY_TAUNT, me); - HasTaunted = true; } - } - } - void KilledUnit(Unit* /*victim*/) - { - DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me); - } + uint32 Surge_Timer; + uint32 MortalWound_Timer; + uint32 Retaliation_Timer; - void JustDied(Unit* /*Killer*/) - { - DoScriptText(SAY_DIE, me); - } + bool HasTaunted; + bool YelledForHeal; - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; + void Reset() + { + Surge_Timer = 5000; + MortalWound_Timer = 4000; + Retaliation_Timer = 0; - if (MortalWound_Timer <= diff) - { - DoCast(me->getVictim(), SPELL_MORTAL_WOUND); - MortalWound_Timer = 5000+rand()%8000; - } else MortalWound_Timer -= diff; + HasTaunted = false; + YelledForHeal = false; + } - if (Surge_Timer <= diff) - { - DoScriptText(SAY_SURGE, me); + void EnterCombat(Unit * /*who*/) + { + DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me); + } - if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(pTarget, SPELL_SURGE); + void MoveInLineOfSight(Unit* who) + { + if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me)) + { + if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = me->GetAttackDistance(who); + if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who)) + { + //who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(who); + } + else if (!HasTaunted && me->IsWithinDistInMap(who, 60.0f)) + { + DoScriptText(SAY_TAUNT, me); + HasTaunted = true; + } + } + } - Surge_Timer = 5000+rand()%8000; - } else Surge_Timer -= diff; + void KilledUnit(Unit* /*victim*/) + { + DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me); + } - if ((me->GetHealth()*100) / me->GetMaxHealth() < 20) - { - if (Retaliation_Timer <= diff) + void JustDied(Unit* /*Killer*/) { - DoCast(me, SPELL_RETALIATION); - Retaliation_Timer = 30000; - } else Retaliation_Timer -= diff; - } + DoScriptText(SAY_DIE, me); + } - if (!YelledForHeal) - { - if ((me->GetHealth()*100) / me->GetMaxHealth() < 40) + void UpdateAI(const uint32 diff) { - DoScriptText(SAY_HEAL, me); - YelledForHeal = true; + if (!UpdateVictim()) + return; + + if (MortalWound_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_MORTAL_WOUND); + MortalWound_Timer = 5000+rand()%8000; + } + else + MortalWound_Timer -= diff; + + if (Surge_Timer <= diff) + { + DoScriptText(SAY_SURGE, me); + + if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget, SPELL_SURGE); + + Surge_Timer = 5000+rand()%8000; + } + else + Surge_Timer -= diff; + + if ((me->GetHealth()*100) / me->GetMaxHealth() < 20) + { + if (Retaliation_Timer <= diff) + { + DoCast(me, SPELL_RETALIATION); + Retaliation_Timer = 30000; + } + else + Retaliation_Timer -= diff; + } + + if (!YelledForHeal) + { + if ((me->GetHealth()*100) / me->GetMaxHealth() < 40) + { + DoScriptText(SAY_HEAL, me); + YelledForHeal = true; + } + } + + DoMeleeAttackIfReady(); } - } + }; - DoMeleeAttackIfReady(); - } + CreatureAI* GetAI(Creature* Creature) const + { + return new boss_watchkeeper_gargolmarAI (Creature); + } }; -CreatureAI* GetAI_boss_watchkeeper_gargolmarAI(Creature* pCreature) -{ - return new boss_watchkeeper_gargolmarAI (pCreature); -} - void AddSC_boss_watchkeeper_gargolmar() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_watchkeeper_gargolmar"; - newscript->GetAI = &GetAI_boss_watchkeeper_gargolmarAI; - newscript->RegisterSelf(); + new boss_watchkeeper_gargolmar(); } diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp index 56cbf1cabcb..ec81dcf62ff 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp @@ -26,61 +26,70 @@ EndScriptData */ #include "ScriptPCH.h" #include "hellfire_ramparts.h" -struct instance_ramparts : public ScriptedInstance +class instance_ramparts : public InstanceMapScript { - instance_ramparts(Map* pMap) : ScriptedInstance(pMap) {Initialize();} + public: + instance_ramparts() + : InstanceMapScript("instance_ramparts") + { + } - uint32 m_auiEncounter[MAX_ENCOUNTER]; - uint64 m_uiChestNGUID; - uint64 m_uiChestHGUID; + struct instance_ramparts_InstanceMapScript : public ScriptedInstance + { + instance_ramparts_InstanceMapScript(Map* pMap) : ScriptedInstance(pMap) {Initialize();} - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint64 m_uiChestNGUID; + uint64 m_uiChestHGUID; - m_uiChestNGUID = 0; - m_uiChestHGUID = 0; - } + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - void OnGameObjectCreate(GameObject* pGo, bool /*add*/) - { - switch(pGo->GetEntry()) - { - case 185168: m_uiChestNGUID = pGo->GetGUID(); break; - case 185169: m_uiChestHGUID = pGo->GetGUID(); break; - } - } + m_uiChestNGUID = 0; + m_uiChestHGUID = 0; + } + + void OnGameObjectCreate(GameObject* pGo, bool /*add*/) + { + switch(pGo->GetEntry()) + { + case 185168: + m_uiChestNGUID = pGo->GetGUID(); + break; + case 185169: + m_uiChestHGUID = pGo->GetGUID(); + break; + } + } - void SetData(uint32 uiType, uint32 uiData) - { - sLog.outDebug("TSCR: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData); + void SetData(uint32 uiType, uint32 uiData) + { + sLog.outDebug("TSCR: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData); - switch(uiType) + switch(uiType) + { + case TYPE_VAZRUDEN: + if (uiData == DONE && m_auiEncounter[1] == DONE) + DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILLISECONDS); + m_auiEncounter[0] = uiData; + break; + case TYPE_NAZAN: + if (uiData == DONE && m_auiEncounter[0] == DONE) + DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILLISECONDS); + m_auiEncounter[1] = uiData; + break; + } + } + }; + + InstanceData* GetInstanceData(Map* pMap) const { - case TYPE_VAZRUDEN: - if (uiData == DONE && m_auiEncounter[1] == DONE) - DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILLISECONDS); - m_auiEncounter[0] = uiData; - break; - case TYPE_NAZAN: - if (uiData == DONE && m_auiEncounter[0] == DONE) - DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILLISECONDS); - m_auiEncounter[1] = uiData; - break; + return new instance_ramparts_InstanceMapScript(pMap); } - } }; -InstanceData* GetInstanceData_instance_ramparts(Map* pMap) -{ - return new instance_ramparts(pMap); -} - void AddSC_instance_ramparts() { - Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "instance_ramparts"; - pNewScript->GetInstanceData = &GetInstanceData_instance_ramparts; - pNewScript->RegisterSelf(); + new instance_ramparts; } |