diff options
3 files changed, 204 insertions, 162 deletions
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_muru.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_muru.cpp index 5fac071128f..debfd7da595 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_muru.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_muru.cpp @@ -115,36 +115,40 @@ float Humanoides[6][5] = uint32 EnrageTimer = 600000; struct TRINITY_DLL_DECL boss_entropiusAI : public ScriptedAI { - boss_entropiusAI(Creature *c) : ScriptedAI(c), Summons(m_creature){ + boss_entropiusAI(Creature *c) : ScriptedAI(c), Summons(m_creature) + { pInstance = c->GetInstanceData(); - Combat = false; } ScriptedInstance* pInstance; SummonList Summons; - bool Combat; uint32 BlackHoleSummonTimer; - void Reset() { - if (!Combat){ - BlackHoleSummonTimer = 15000; - DoCastAOE(SPELL_NEGATIVE_ENERGY_E, false); - }else{ - if(pInstance) - pInstance->SetData(DATA_MURU_EVENT, NOT_STARTED); - Summons.DespawnAll(); - } + void Reset() + { + BlackHoleSummonTimer = 15000; + DoCastAOE(SPELL_NEGATIVE_ENERGY_E, false); + + Summons.DespawnAll(); + + if(pInstance) + pInstance->SetData(DATA_MURU_EVENT, NOT_STARTED); } - void EnterCombat(Unit *who) { + void EnterCombat(Unit *who) + { DoCastAOE(SPELL_NEGATIVE_ENERGY_E, true); DoCast(m_creature, SPELL_ENTROPIUS_SPAWN, false); + + if(pInstance) + pInstance->SetData(DATA_MURU_EVENT, IN_PROGRESS); } void JustSummoned(Creature* summoned) { - switch(summoned->GetEntry()){ + switch(summoned->GetEntry()) + { case CREATURE_DARK_FIENDS: summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false); break; @@ -159,13 +163,12 @@ struct TRINITY_DLL_DECL boss_entropiusAI : public ScriptedAI Summons.Summon(summoned); } - void KilledUnit(Unit* victim){ - - } - - void JustDied(Unit* killer){ - if(pInstance)pInstance->SetData(DATA_MURU_EVENT, DONE); + void JustDied(Unit* killer) + { Summons.DespawnAll(); + + if(pInstance) + pInstance->SetData(DATA_MURU_EVENT, DONE); } void UpdateAI(const uint32 diff) @@ -173,25 +176,29 @@ struct TRINITY_DLL_DECL boss_entropiusAI : public ScriptedAI if(!UpdateVictim()) return; - if(!Combat)Combat = true; - - if(EnrageTimer < diff && !m_creature->HasAura(SPELL_ENRAGE, 0)){ + if(EnrageTimer < diff && !m_creature->HasAura(SPELL_ENRAGE, 0)) + { DoCast(m_creature,SPELL_ENRAGE, false); }else EnrageTimer -= diff; - if(BlackHoleSummonTimer < diff){ + if(BlackHoleSummonTimer < diff) + { Unit* random = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); - if(!random)return; + if(!random) + return; + DoCast(random, SPELL_DARKNESS_E, false); + random = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); - if(!random)return; + if(!random) + return; + random->CastSpell(random, SPELL_BLACKHOLE, false); BlackHoleSummonTimer = 15000; }else BlackHoleSummonTimer -= diff; DoMeleeAttackIfReady(); } - }; CreatureAI* GetAI_boss_entropius(Creature *_Creature) @@ -201,7 +208,8 @@ CreatureAI* GetAI_boss_entropius(Creature *_Creature) struct TRINITY_DLL_DECL boss_muruAI : public Scripted_NoMovementAI { - boss_muruAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature){ + boss_muruAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature) + { pInstance = c->GetInstanceData(); } @@ -223,36 +231,42 @@ struct TRINITY_DLL_DECL boss_muruAI : public Scripted_NoMovementAI Timer[TIMER_HUMANOIDES] = 10000; Timer[TIMER_PHASE] = 2000; Timer[TIMER_SENTINEL] = 31500; - Summons.DespawnAll(); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetVisibility(VISIBILITY_ON); + + Summons.DespawnAll(); + if(pInstance) pInstance->SetData(DATA_MURU_EVENT, NOT_STARTED); } void EnterCombat(Unit *who) { + DoCastAOE(SPELL_NEGATIVE_ENERGY,false); + if(pInstance) pInstance->SetData(DATA_MURU_EVENT, IN_PROGRESS); - DoCastAOE(SPELL_NEGATIVE_ENERGY,false); } - void KilledUnit(Unit* victim){} - - void DamageTaken(Unit *done_by, uint32 &damage) { - if(damage > m_creature->GetHealth() && Phase == 1){ + void DamageTaken(Unit *done_by, uint32 &damage) + { + if(damage > m_creature->GetHealth() && Phase == 1) + { damage = 0; Phase = 2; m_creature->RemoveAllAuras(); DoCast(m_creature, SPELL_OPEN_ALL_PORTALS, false); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - if(Phase > 1 && Phase < 4)damage = 0; + if(Phase > 1 && Phase < 4) + damage = 0; } void JustSummoned(Creature* summoned) { - switch(summoned->GetEntry()){ + switch(summoned->GetEntry()) + { case BOSS_ENTROPIUS: m_creature->SetVisibility(VISIBILITY_OFF); break; @@ -269,9 +283,12 @@ struct TRINITY_DLL_DECL boss_muruAI : public Scripted_NoMovementAI if(!UpdateVictim()) return; - if(Phase == 3){ - if(Timer[TIMER_PHASE] <diff){ - switch(pInstance->GetData(DATA_MURU_EVENT)){ + if(Phase == 3) + { + if(Timer[TIMER_PHASE] <diff) + { + switch(pInstance->GetData(DATA_MURU_EVENT)) + { case NOT_STARTED: Reset(); break; @@ -287,52 +304,58 @@ struct TRINITY_DLL_DECL boss_muruAI : public Scripted_NoMovementAI } if (EnrageTimer < diff && !m_creature->HasAura(SPELL_ENRAGE, 0)) + { DoCast(m_creature, SPELL_ENRAGE, false); - else EnrageTimer -= diff; + }else EnrageTimer -= diff; - for (uint8 i = 0; i < 4; ++i){ - if(Timer[i] < diff){ - switch(i){ + for (uint8 i = 0; i < 4; ++i) + { + if(Timer[i] < diff) + { + switch(i) + { case TIMER_DARKNESS: - if(!DarkFiend){ + if(!DarkFiend) + { DoCastAOE(SPELL_DARKNESS, false); Timer[TIMER_DARKNESS] = 3000; DarkFiend = true; - }else{ + } + else + { DarkFiend = false; for(uint8 i = 0; i < 8; ++i) m_creature->SummonCreature(CREATURE_DARK_FIENDS,DarkFiends[i][0],DarkFiends[i][1],DarkFiends[i][2], DarkFiends[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); Timer[TIMER_DARKNESS] = 42000; } break; - case TIMER_HUMANOIDES: for(uint8 i = 0; i < 6; ++i) m_creature->SummonCreature(Humanoides[i][0],Humanoides[i][1],Humanoides[i][2],Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0); Timer[TIMER_HUMANOIDES] = 60000; break; - case TIMER_PHASE: m_creature->RemoveAllAuras(); DoCast(m_creature, SPELL_SUMMON_ENTROPIUS, false); Timer[TIMER_PHASE] = 3000; Phase = 3; return; - case TIMER_SENTINEL: DoCastAOE(SPELL_OPEN_PORTAL_2, false); Timer[TIMER_SENTINEL] = 30000; break; - }break;} + } + break; + } } //Timer - for(uint8 i = 0; i < 4; ++i){ + for(uint8 i = 0; i < 4; ++i) + { if(i != TIMER_PHASE)Timer[i] -= diff; else if(Phase == 2) Timer[i] -= diff; } } - }; CreatureAI* GetAI_boss_muru(Creature *_Creature) @@ -342,37 +365,50 @@ CreatureAI* GetAI_boss_muru(Creature *_Creature) struct TRINITY_DLL_DECL npc_muru_portalAI : public Scripted_NoMovementAI { - npc_muru_portalAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature){ + npc_muru_portalAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature) + { pInstance = c->GetInstanceData(); } ScriptedInstance* pInstance; + SummonList Summons; Creature* Muru; + bool SummonSentinel; bool InAction; + uint32 SummonTimer; - void Reset(){ - m_creature->addUnitState(UNIT_STAT_STUNNED); + void Reset() + { SummonTimer = 5000; + InAction = false; SummonSentinel = false; + + m_creature->addUnitState(UNIT_STAT_STUNNED); + Summons.DespawnAll(); } - void JustSummoned(Creature* summoned){ + void JustSummoned(Creature* summoned) + { Player* Target = Unit::GetPlayer(pInstance->GetData64(DATA_PLAYER_GUID)); - if(Target)summoned->AI()->AttackStart(Target); + if(Target) + summoned->AI()->AttackStart(Target); + Summons.Summon(summoned); } - void SpellHit(Unit* caster, const SpellEntry* Spell){ + void SpellHit(Unit* caster, const SpellEntry* Spell) + { float x,y,z,o; m_creature->GetHomePosition(x,y,z,o); DoTeleportTo(x,y,z); InAction = true; - switch(Spell->Id){ + switch(Spell->Id) + { case SPELL_OPEN_ALL_PORTALS: DoCastAOE(SPELL_OPEN_PORTAL, false); break; @@ -383,19 +419,20 @@ struct TRINITY_DLL_DECL npc_muru_portalAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 diff){ - if(!SummonSentinel){ + void UpdateAI(const uint32 diff) + { + if(!SummonSentinel) + { if(InAction && pInstance->GetData(DATA_MURU_EVENT) == NOT_STARTED)Reset(); return; } - if(SummonTimer < diff){ + if(SummonTimer < diff) + { DoCastAOE(SPELL_SUMMON_VOID_SENTINEL, false); SummonTimer = 5000; SummonSentinel = false; }else SummonTimer -= diff; } - - }; CreatureAI* GetAI_npc_muru_portal(Creature *_Creature) @@ -405,23 +442,29 @@ CreatureAI* GetAI_npc_muru_portal(Creature *_Creature) struct TRINITY_DLL_DECL npc_dark_fiendAI : public ScriptedAI { - npc_dark_fiendAI(Creature *c) : ScriptedAI(c){ + npc_dark_fiendAI(Creature *c) : ScriptedAI(c) + { pInstance = c->GetInstanceData(); } ScriptedInstance* pInstance; - bool InAction; + uint32 WaitTimer; + bool InAction; - void Reset() { + void Reset() + { WaitTimer = 2000; InAction = false; + m_creature->addUnitState(UNIT_STAT_STUNNED); - }; + } - void SpellHit(Unit* caster, const SpellEntry* Spell){ + void SpellHit(Unit* caster, const SpellEntry* Spell) + { for(uint8 i = 0; i < 3; ++i) - if(Spell->Effect[i] == 38){ + if(Spell->Effect[i] == 38) + { m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); m_creature->RemoveCorpse(); } @@ -433,23 +476,28 @@ struct TRINITY_DLL_DECL npc_dark_fiendAI : public ScriptedAI return; if (WaitTimer < diff) - if(!InAction){ + { + if(!InAction) + { m_creature->clearUnitState(UNIT_STAT_STUNNED); DoCastAOE(SPELL_DARKFIEND_SKIN, false); AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)); InAction = true; WaitTimer = 500; - }else{ - if(m_creature->IsWithinDist(m_creature->getVictim(), 5)){ + } + else + { + + if(m_creature->IsWithinDist(m_creature->getVictim(), 5)) + { DoCastAOE(SPELL_DARKFIEND_AOE, false); m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); m_creature->RemoveCorpse(); } WaitTimer = 500; } - else WaitTimer -= diff; + }else WaitTimer -= diff; } - }; CreatureAI* GetAI_npc_dark_fiend(Creature *_Creature) @@ -459,7 +507,8 @@ CreatureAI* GetAI_npc_dark_fiend(Creature *_Creature) struct TRINITY_DLL_DECL npc_void_sentinelAI : public ScriptedAI { - npc_void_sentinelAI(Creature *c) : ScriptedAI(c){ + npc_void_sentinelAI(Creature *c) : ScriptedAI(c) + { pInstance = c->GetInstanceData(); } @@ -468,39 +517,42 @@ struct TRINITY_DLL_DECL npc_void_sentinelAI : public ScriptedAI uint32 PulseTimer; uint32 VoidBlastTimer; - - void Reset() { + void Reset() + { PulseTimer = 3000; VoidBlastTimer = 45000; //is this a correct timer? + float x,y,z,o; m_creature->GetHomePosition(x,y,z,o); DoTeleportTo(x,y,71); - }; + } - void JustDied(Unit* killer){ + void JustDied(Unit* killer) + { for (uint8 i = 0; i < 8; ++i){ m_creature->SummonCreature(CREATURE_VOID_SPAWN, m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(), rand()%6, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000); } - } + void UpdateAI(const uint32 diff) { if(!UpdateVictim()) return; - if(PulseTimer < diff){ + if(PulseTimer < diff) + { DoCastAOE(SPELL_SHADOW_PULSE, true); PulseTimer = 3000; }else PulseTimer -= diff; - if(VoidBlastTimer < diff){ + if(VoidBlastTimer < diff) + { DoCast(m_creature->getVictim(), SPELL_VOID_BLAST, false); VoidBlastTimer = 45000; }else VoidBlastTimer -= diff; DoMeleeAttackIfReady(); } - }; CreatureAI* GetAI_npc_void_sentinel(Creature *_Creature) @@ -510,7 +562,8 @@ CreatureAI* GetAI_npc_void_sentinel(Creature *_Creature) struct TRINITY_DLL_DECL npc_blackholeAI : public ScriptedAI { - npc_blackholeAI(Creature *c) : ScriptedAI(c){ + npc_blackholeAI(Creature *c) : ScriptedAI(c) + { pInstance = c->GetInstanceData(); } @@ -521,23 +574,28 @@ struct TRINITY_DLL_DECL npc_blackholeAI : public ScriptedAI uint8 Phase; uint8 NeedForAHack; - void Reset(){ + void Reset() + { DespawnTimer = 15000; SpellTimer = 5000; Phase = 0; + m_creature->addUnitState(UNIT_STAT_STUNNED); DoCastAOE(SPELL_BLACKHOLE_SPAWN, true); } void UpdateAI(const uint32 diff) { - if(SpellTimer < diff){ + if(SpellTimer < diff) + { Unit* Victim = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID)); - switch(NeedForAHack){ + switch(NeedForAHack) + { case 0: m_creature->clearUnitState(UNIT_STAT_STUNNED); DoCastAOE(SPELL_BLACKHOLE_GROW, false); - if(Victim)AttackStart(Victim); + if(Victim) + AttackStart(Victim); SpellTimer = 700; NeedForAHack = 2; break; @@ -555,13 +613,15 @@ struct TRINITY_DLL_DECL npc_blackholeAI : public ScriptedAI SpellTimer = 400+rand()%500; NeedForAHack = 1; Unit* Temp = m_creature->getVictim(); - if(!Temp) return; + if(!Temp) + return; if(Temp->GetPositionZ() > 73 && Victim) AttackStart(Victim); } }else SpellTimer -= diff; - if (DespawnTimer < diff){ + if (DespawnTimer < diff) + { m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); m_creature->RemoveCorpse(); }else DespawnTimer -= diff; @@ -577,32 +637,32 @@ void AddSC_boss_muru() { Script *newscript; newscript = new Script; - newscript->Name="boss_muru"; + newscript->Name = "boss_muru"; newscript->GetAI = &GetAI_boss_muru; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="boss_entropius"; + newscript->Name = "boss_entropius"; newscript->GetAI = &GetAI_boss_entropius; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="npc_muru_portal"; + newscript->Name = "npc_muru_portal"; newscript->GetAI = &GetAI_npc_muru_portal; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="npc_dark_fiend"; + newscript->Name = "npc_dark_fiend"; newscript->GetAI = &GetAI_npc_dark_fiend; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="npc_void_sentinel"; + newscript->Name = "npc_void_sentinel"; newscript->GetAI = &GetAI_npc_void_sentinel; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="npc_blackhole"; + newscript->Name = "npc_blackhole"; newscript->GetAI = &GetAI_npc_blackhole; newscript->RegisterSelf(); -}
\ No newline at end of file +} diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h b/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h index 9fbb5de7300..ca8c014d9df 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h @@ -30,12 +30,6 @@ /*** GameObjects ***/ #define DATA_GO_FORCEFIELD 20 -#define DATA_GO_FIRE_BARRIER 21 -#define DATA_GATE_1 22 -#define DATA_GATE_2 23 -#define DATA_GATE_3 24 -#define DATA_GATE_4 25 -#define DATA_GATE_5 26 /*** Misc ***/ #define DATA_PLAYER_GUID 27 diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp index f8c7dde1ca2..9a8497a2df9 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp @@ -4,8 +4,8 @@ /* ScriptData SDName: Instance_Sunwell_Plateau -SD%Complete: 20 -SDComment: VERIFY SCRIPT, rename Gates +SD%Complete: 25 +SDComment: VERIFY SCRIPT SDCategory: Sunwell_Plateau EndScriptData */ @@ -14,11 +14,6 @@ EndScriptData */ #define ENCOUNTERS 6 -enum GoState{ -CLOSE = 1, -OPEN = 0 -}; - /* Sunwell Plateau: 0 - Kalecgos and Sathrovarr 1 - Brutallus @@ -51,8 +46,8 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance /** GameObjects **/ uint64 ForceField; // Kalecgos Encounter - uint64 FireBarrier; // Brutallus Encounter - uint64 Gate[5]; // Rename this to be more specific after door placement is verified. + uint64 FireBarrier; // Felmysts Encounter + uint64 MurusGate[2]; // Murus Encounter /*** Misc ***/ uint32 SpectralRealmTimer; @@ -78,11 +73,8 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance /*** GameObjects ***/ ForceField = 0; FireBarrier = 0; - Gate[0] = 0; // TODO: Rename Gate[n] with gate_<boss name> for better specificity - Gate[1] = 0; - Gate[2] = 0; - Gate[3] = 0; - Gate[4] = 0; + MurusGate[0] = 0; + MurusGate[1] = 0; /*** Encounters ***/ for(uint8 i = 0; i < ENCOUNTERS; ++i) @@ -144,12 +136,17 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance switch(go->GetEntry()) { case 188421: ForceField = go->GetGUID(); break; - case 188075: FireBarrier = go->GetGUID(); break; - case 187979: Gate[0] = go->GetGUID(); break; - case 187770: Gate[1] = go->GetGUID(); break; - case 187896: Gate[2] = go->GetGUID(); break; - case 187990: Gate[3] = go->GetGUID(); break; - case 188118: Gate[4] = go->GetGUID(); break; + case 188075: + if(Encounters[2] == DONE) + HandleGameObject(NULL, true, go); + FireBarrier = go->GetGUID(); + break; + case 187990: MurusGate[0] = go->GetGUID(); break; + case 188118: + if(Encounters[4] == DONE) + HandleGameObject(NULL, true, go); + MurusGate[1]= go->GetGUID(); + break; } } @@ -157,14 +154,13 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance { switch(id) { - case DATA_KALECGOS_EVENT: return Encounters[0]; break; - case DATA_BRUTALLUS_EVENT: return Encounters[1]; break; - case DATA_FELMYST_EVENT: return Encounters[2]; break; - case DATA_EREDAR_TWINS_EVENT: return Encounters[3]; break; - case DATA_MURU_EVENT: return Encounters[4]; break; - case DATA_KILJAEDEN_EVENT: return Encounters[5]; break; + case DATA_KALECGOS_EVENT: return Encounters[0]; + case DATA_BRUTALLUS_EVENT: return Encounters[1]; + case DATA_FELMYST_EVENT: return Encounters[2]; + case DATA_EREDAR_TWINS_EVENT: return Encounters[3]; + case DATA_MURU_EVENT: return Encounters[4]; + case DATA_KILJAEDEN_EVENT: return Encounters[5]; } - return 0; } @@ -172,25 +168,24 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance { switch(id) { - case DATA_KALECGOS_DRAGON: return Kalecgos_Dragon; break; - case DATA_KALECGOS_HUMAN: return Kalecgos_Human; break; - case DATA_SATHROVARR: return Sathrovarr; break; - case DATA_BRUTALLUS: return Brutallus; break; - case DATA_MADRIGOSA: return Madrigosa; break; - case DATA_FELMYST: return Felmyst; break; - case DATA_ALYTHESS: return Alythess; break; - case DATA_SACROLASH: return Sacrolash; break; - case DATA_MURU: return Muru; break; - case DATA_KILJAEDEN: return KilJaeden; break; - case DATA_KILJAEDEN_CONTROLLER: return KilJaedenController; break; - case DATA_ANVEENA: return Anveena; break; - case DATA_KALECGOS_KJ: return KalecgosKJ; break; + case DATA_KALECGOS_DRAGON: return Kalecgos_Dragon; + case DATA_KALECGOS_HUMAN: return Kalecgos_Human; + case DATA_SATHROVARR: return Sathrovarr; + case DATA_GO_FORCEFIELD: return ForceField; + case DATA_BRUTALLUS: return Brutallus; + case DATA_MADRIGOSA: return Madrigosa; + case DATA_FELMYST: return Felmyst; + case DATA_ALYTHESS: return Alythess; + case DATA_SACROLASH: return Sacrolash; + case DATA_MURU: return Muru; + case DATA_KILJAEDEN: return KilJaeden; + case DATA_KILJAEDEN_CONTROLLER: return KilJaedenController; + case DATA_ANVEENA: return Anveena; + case DATA_KALECGOS_KJ: return KalecgosKJ; case DATA_PLAYER_GUID: Player* Target = GetPlayerInMap(); return Target->GetGUID(); - break; } - return 0; } @@ -202,22 +197,23 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance case DATA_BRUTALLUS_EVENT: Encounters[1] = data; break; case DATA_FELMYST_EVENT: if(data == DONE) - HandleGameObject(FireBarrier, OPEN); + HandleGameObject(FireBarrier, true); Encounters[2] = data; break; case DATA_EREDAR_TWINS_EVENT: Encounters[3] = data; break; case DATA_MURU_EVENT: - switch(data){ + switch(data) + { case DONE: - HandleGameObject(Gate[4], OPEN); - HandleGameObject(Gate[3], OPEN); + HandleGameObject(MurusGate[0], true); + HandleGameObject(MurusGate[1], true); break; case IN_PROGRESS: - HandleGameObject(Gate[4], CLOSE); - HandleGameObject(Gate[3], CLOSE); + HandleGameObject(MurusGate[0], false); + HandleGameObject(MurusGate[1], false); break; case NOT_STARTED: - HandleGameObject(Gate[4], CLOSE); - HandleGameObject(Gate[3], OPEN); + HandleGameObject(MurusGate[0], true); + HandleGameObject(MurusGate[1], false); break; } Encounters[4] = data; break; @@ -228,14 +224,6 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance SaveToDB(); } - void SetData64(uint32 id, uint64 guid) - { - } - - void Update(uint32 diff) - { - } - std::string GetSaveData() { OUT_SAVE_INST_DATA; @@ -249,7 +237,6 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance OUT_SAVE_INST_DATA_COMPLETE; return out; } - return NULL; } @@ -280,6 +267,7 @@ InstanceData* GetInstanceData_instance_sunwell_plateau(Map* map) void AddSC_instance_sunwell_plateau() { Script *newscript; + newscript = new Script; newscript->Name = "instance_sunwell_plateau"; newscript->GetInstanceData = &GetInstanceData_instance_sunwell_plateau; |