diff options
Diffstat (limited to 'src')
38 files changed, 1314 insertions, 1159 deletions
diff --git a/src/bindings/scripts/Makefile.am b/src/bindings/scripts/Makefile.am index 6c473cb8d4c..34ef03bb3e0 100644 --- a/src/bindings/scripts/Makefile.am +++ b/src/bindings/scripts/Makefile.am @@ -253,24 +253,20 @@ scripts/zone/mulgore/mulgore.cpp \ scripts/zone/nagrand/nagrand.cpp \ scripts/zone/naxxramas/boss_anubrekhan.cpp \ scripts/zone/naxxramas/boss_faerlina.cpp \ -scripts/zone/naxxramas/boss_feugen.cpp \ scripts/zone/naxxramas/boss_gluth.cpp \ scripts/zone/naxxramas/boss_gothik.cpp \ scripts/zone/naxxramas/boss_grobbulus.cpp \ scripts/zone/naxxramas/boss_heigan.cpp \ scripts/zone/naxxramas/boss_highlord_mograine.cpp \ scripts/zone/naxxramas/boss_kelthuzad.cpp \ -scripts/zone/naxxramas/boss_lady_blaumeux.cpp \ +scripts/zone/naxxramas/boss_four_horsemen.cpp \ scripts/zone/naxxramas/boss_loatheb.cpp \ scripts/zone/naxxramas/boss_maexxna.cpp \ scripts/zone/naxxramas/boss_noth.cpp \ scripts/zone/naxxramas/boss_patchwerk.cpp \ scripts/zone/naxxramas/boss_razuvious.cpp \ scripts/zone/naxxramas/boss_sapphiron.cpp \ -scripts/zone/naxxramas/boss_sir_zeliek.cpp \ -scripts/zone/naxxramas/boss_stalagg.cpp \ scripts/zone/naxxramas/boss_thaddius.cpp \ -scripts/zone/naxxramas/boss_thane_korthazz.cpp \ scripts/zone/naxxramas/instance_naxxramas.cpp \ scripts/zone/netherstorm/netherstorm.cpp \ scripts/zone/onyxias_lair/boss_onyxia.cpp \ diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 8fb5bdb1021..558d53faf4a 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -342,6 +342,7 @@ extern void AddSC_boss_moroes(); extern void AddSC_bosses_opera(); extern void AddSC_instance_karazhan(); extern void AddSC_karazhan(); +extern void AddSC_boss_nightbane(); //Loch Modan extern void AddSC_loch_modan(); @@ -390,15 +391,13 @@ extern void AddSC_boss_maexxna(); extern void AddSC_boss_patchwerk(); extern void AddSC_boss_razuvious(); extern void AddSC_boss_highlord_mograine(); -extern void AddSC_boss_lady_blaumeux(); -extern void AddSC_boss_sir_zeliek(); -extern void AddSC_boss_thane_korthazz(); extern void AddSC_boss_kelthuzad(); extern void AddSC_boss_faerlina(); extern void AddSC_boss_loatheb(); extern void AddSC_boss_noth(); extern void AddSC_boss_gluth(); extern void AddSC_boss_sapphiron(); +extern void AddSC_boss_four_horsemen(); //Netherstorm extern void AddSC_netherstorm(); @@ -1547,6 +1546,7 @@ void ScriptsInit() AddSC_bosses_opera(); AddSC_instance_karazhan(); AddSC_karazhan(); + AddSC_boss_nightbane(); //Loch Modan AddSC_loch_modan(); @@ -1595,15 +1595,13 @@ void ScriptsInit() AddSC_boss_patchwerk(); AddSC_boss_razuvious(); AddSC_boss_highlord_mograine(); - AddSC_boss_lady_blaumeux(); - AddSC_boss_sir_zeliek(); - AddSC_boss_thane_korthazz(); AddSC_boss_kelthuzad(); AddSC_boss_faerlina(); AddSC_boss_loatheb(); AddSC_boss_noth(); AddSC_boss_gluth(); AddSC_boss_sapphiron(); + AddSC_boss_four_horsemen(); //Netherstorm AddSC_netherstorm(); diff --git a/src/bindings/scripts/VC71/71ScriptDev2.vcproj b/src/bindings/scripts/VC71/71ScriptDev2.vcproj index 24b76d9d4cf..33875e0a696 100644 --- a/src/bindings/scripts/VC71/71ScriptDev2.vcproj +++ b/src/bindings/scripts/VC71/71ScriptDev2.vcproj @@ -829,7 +829,7 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_feugen.cpp" + RelativePath="..\scripts\zone\naxxramas\boss_four_horsemen.cpp" > </File> <File @@ -857,10 +857,6 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_lady_blaumeux.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\boss_loatheb.cpp" > </File> @@ -885,22 +881,10 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_sir_zeliek.cpp" - > - </File> - <File - RelativePath="..\scripts\zone\naxxramas\boss_stalagg.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\boss_thaddius.cpp" > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_thane_korthazz.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\instance_naxxramas.cpp" > </File> diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index 72e05948c9d..85d3d46d157 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -1006,7 +1006,7 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_feugen.cpp" + RelativePath="..\scripts\zone\naxxramas\boss_four_horsemen.cpp" > </File> <File @@ -1034,10 +1034,6 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_lady_blaumeux.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\boss_loatheb.cpp" > </File> @@ -1062,22 +1058,10 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_sir_zeliek.cpp" - > - </File> - <File - RelativePath="..\scripts\zone\naxxramas\boss_stalagg.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\boss_thaddius.cpp" > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_thane_korthazz.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\instance_naxxramas.cpp" > </File> diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index 996ccb6f6d2..cb2f11c16dc 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -999,7 +999,7 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_feugen.cpp" + RelativePath="..\scripts\zone\naxxramas\boss_four_horsemen.cpp" > </File> <File @@ -1027,10 +1027,6 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_lady_blaumeux.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\boss_loatheb.cpp" > </File> @@ -1055,22 +1051,10 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_sir_zeliek.cpp" - > - </File> - <File - RelativePath="..\scripts\zone\naxxramas\boss_stalagg.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\boss_thaddius.cpp" > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_thane_korthazz.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\instance_naxxramas.cpp" > </File> diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index d46d5b68716..b54f91a113d 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -736,7 +736,7 @@ void ScriptedAI::DoTeleportAll(float x, float y, float z, float o) Map::PlayerList const &PlayerList = map->GetPlayers(); for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) if (Player* i_pl = i->getSource()) - if (!i_pl->isAlive()) + if (i_pl->isAlive()) i_pl->TeleportTo(m_creature->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT); } diff --git a/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp b/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp index 92dcb34a433..ad43b63b5f3 100644 --- a/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp +++ b/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp @@ -34,7 +34,7 @@ EndContentData */ #define SAY_PROGRESS_1 "Ok, $N. Follow me to the cave where I'll attempt to harness the power of the rune stone into these goggles." #define SAY_PROGRESS_2 "I discovered this cave on our first day here. I believe the energy in the stone can be used to our advantage." -#define SAY_PROGRESS_3 "I'll begin drawing energy from the stone. Your job, $N, i to defend me. This place is cursed... trust me." +#define SAY_PROGRESS_3 "I'll begin drawing energy from the stone. Your job, $N, is to defend me. This place is cursed... trust me." #define EMOTE_PROGRESS_4 "begins tinkering with the goggles before the stone." #define SAY_AGGRO "Help!!! Get these things off me so I can get my work done!" #define SAY_PROGRESS_5 "Almost done! Just a little longer!" @@ -61,10 +61,8 @@ struct TRINITY_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI case 8:DoTextEmote(EMOTE_PROGRESS_4, NULL);break; case 9: { - Creature* sum1 = m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_DEAD_DESPAWN, 0); - Creature* sum2 = m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_DEAD_DESPAWN, 0); - sum1->Attack(m_creature, true); - sum2->Attack(m_creature, true); + m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); break; } case 10:DoSay(SAY_PROGRESS_5, LANG_UNIVERSAL, player, true);break; @@ -73,11 +71,17 @@ struct TRINITY_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI case 20: DoTextEmote(EMOTE_PROGRESS_8, NULL); DoSay(SAY_PROGRESS_9, LANG_UNIVERSAL, player, true); + if(player) ((Player*)player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, m_creature); break; } } + void JustSummoned(Creature *summoned) + { + summoned->AI()->AttackStart(m_creature); + } + void Reset(){} void Aggro(Unit* who) diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index a797be68b06..06947376619 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -183,9 +183,6 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI float attackRadius = m_creature->GetAttackDistance(who); if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who)) { - //if(who->HasStealthAura()) - // who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(who); } } diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp index bffb418980a..ab2f4807551 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp @@ -16,18 +16,413 @@ /* ScriptData SDName: Boss_Nightbane -SD%Complete: 0 -SDComment: Place holder +SD%Complete: 80 +SDComment: SDComment: skelleton adds need 2 more, timers, SDCategory: Karazhan EndScriptData */ #include "precompiled.h" - +#include "def_karazhan.h" + +//phase 1 #define SPELL_BELLOWING_ROAR 39427 -#define SPELL_CHARRED_EARTH 30129 //Also 30209 (Target Charred Earth) triggers this +#define SPELL_CHARRED_EARTH 30129 #define SPELL_DISTRACTING_ASH 30130 #define SPELL_SMOLDERING_BREATH 30210 #define SPELL_TAIL_SWEEP 25653 +//phase 2 #define SPELL_RAIN_OF_BONES 37098 #define SPELL_SMOKING_BLAST 37057 #define SPELL_FIREBALL_BARRAGE 30282 +#define SPELL_SEARING_CINDERS 30127 +#define SPELL_SUMMON_SKELETON 30170 + +#define EMOTE_SUMMON "An ancient being awakens in the distance..." +#define YELL_AGGRO "What fools! I shall bring a quick end to your suffering!" +#define YELL_FLY_PHASE "Miserable vermin. I shall exterminate you from the air!" +#define YELL_LAND_PHASE_1 "Enough! I shall land and crush you myself!" +#define YELL_LAND_PHASE_2 "Insects! Let me show you my strength up close!" +#define EMOTE_BREATH "takes a deep breath." + +float IntroWay[8][3] = +{ + {-11053.37,-1794.48,149}, + {-11141.07,-1841.40,125}, + {-11187.28,-1890.23,125}, + {-11189.20,-1931.25,125}, + {-11153.76,-1948.93,125}, + {-11128.73,-1929.75,125}, + {-11140 , -1915 ,122}, + {-11163 , -1903 ,91.473} +}; + +//float IntroWay[5][3] = +//{ +// {-11000.00, -1765.75, 140.40}, +// {-11000.00, -1765.75, 171.00}, +// {-11173.67, -1832.26, 117.76}, +// {-11142.75, -1916.78, 119.769}, +// {-11161.91, -1911.148, 91.473} +//}; + +struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI +{ + boss_nightbaneAI(Creature* c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + Intro = true; + Reset(); + } + + ScriptedInstance* pInstance; + + uint32 Phase; + + bool RainBones; + bool Skeletons; + + uint32 BellowingRoarTimer; + uint32 CharredEarthTimer; + uint32 DistractingAshTimer; + uint32 SmolderingBreathTimer; + uint32 TailSweepTimer; + uint32 RainofBonesTimer; + uint32 SmokingBlastTimer; + uint32 FireballBarrageTimer; + uint32 SearingCindersTimer; + + uint32 FlyCount; + uint32 FlyTimer; + + bool Intro; + bool Flying; + bool Movement; + + uint32 WaitTimer; + uint32 MovePhase; + + void Reset() + { + BellowingRoarTimer = 30000; + CharredEarthTimer = 15000; + DistractingAshTimer = 20000; + SmolderingBreathTimer = 10000; + TailSweepTimer = 12000; + RainofBonesTimer = 10000; + SmokingBlastTimer = 20000; + FireballBarrageTimer = 13000; + SearingCindersTimer = 14000; + WaitTimer = 1000; + + Phase =1; + FlyCount = 0; + MovePhase = 0; + + m_creature->SetSpeed(MOVE_RUN, 2.0f); + m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING); + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + m_creature->setActive(true); + + if(pInstance->GetData(DATA_NIGHTBANE_EVENT) == DONE) + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + else + pInstance->SetData(DATA_NIGHTBANE_EVENT, NOT_STARTED); + + HandleTerraceDoors(true); + + Flying = false; + Movement = false; + + if(!Intro) + { + m_creature->SetHomePosition(IntroWay[7][0],IntroWay[7][1],IntroWay[7][2],0); + m_creature->GetMotionMaster()->MoveTargetedHome(); + } + } + + void HandleTerraceDoors(bool open) + { + if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1))) + Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); + if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2))) + Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); + } + + void Aggro(Unit *who) + { + if(pInstance) + pInstance->SetData(DATA_NIGHTBANE_EVENT, IN_PROGRESS); + + HandleTerraceDoors(false); + DoYell(YELL_AGGRO, LANG_UNIVERSAL, NULL); + } + + void AttackStart(Unit* who) + { + if(!Intro && !Flying) + ScriptedAI::AttackStart(who); + } + + void JustDied(Unit* killer) + { + if(pInstance) + pInstance->SetData(DATA_NIGHTBANE_EVENT, DONE); + + HandleTerraceDoors(true); + } + + void MoveInLineOfSight(Unit *who) + { + if(!Intro && !Flying) + { + if(!m_creature->getVictim() && m_creature->canStartAttack(who)) + ScriptedAI::AttackStart(who); + } + } + + void MovementInform(uint32 type, uint32 id) + { + if(type != POINT_MOTION_TYPE) + return; + + if(Intro) + { + if(id >= 8) + { + Intro = false; + m_creature->SetHomePosition(IntroWay[7][0],IntroWay[7][1],IntroWay[7][2],0); + return; + } + + WaitTimer = 1; + } + + if(Flying) + { + if(id == 0) + { + DoTextEmote(EMOTE_BREATH, NULL, true); + Flying = false; + Phase = 2; + return; + } + + if(id == 3) + { + MovePhase = 4; + WaitTimer = 1; + return; + } + + if(id == 8) + { + Flying = false; + Phase = 1; + Movement = true; + return; + } + + WaitTimer = 1; + } + } + + void JustSummoned(Creature *summoned) + { + summoned->AI()->AttackStart(m_creature->getVictim()); + } + + void TakeOff() + { + DoYell(YELL_FLY_PHASE, LANG_UNIVERSAL, NULL); + + m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); + m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING); + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MovePoint(0,IntroWay[2][0],IntroWay[2][1],IntroWay[2][2]); + + Flying = true; + + FlyTimer = 45000+rand()%15000; //timer wrong between 45 and 60 seconds + ++FlyCount; + + RainofBonesTimer = 5000; //timer wrong (maybe) + RainBones = false; + Skeletons = false; + } + + void UpdateAI(const uint32 diff) + { + if(WaitTimer) + if(WaitTimer < diff) + { + if(Intro) + { + if(MovePhase >= 7) + { + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND); + m_creature->GetMotionMaster()->MovePoint(8,IntroWay[7][0],IntroWay[7][1],IntroWay[7][2]); + } + else + { + m_creature->GetMotionMaster()->MovePoint(MovePhase,IntroWay[MovePhase][0],IntroWay[MovePhase][1],IntroWay[MovePhase][2]); + ++MovePhase; + } + } + + if(Flying) + { + if(MovePhase >= 7) + { + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND); + m_creature->GetMotionMaster()->MovePoint(8,IntroWay[7][0],IntroWay[7][1],IntroWay[7][2]); + } + else + { + m_creature->GetMotionMaster()->MovePoint(MovePhase,IntroWay[MovePhase][0],IntroWay[MovePhase][1],IntroWay[MovePhase][2]); + ++MovePhase; + } + } + + WaitTimer = 0; + }else WaitTimer -= diff; + + if(!m_creature->SelectHostilTarget()) + return; + + if(Flying) + return; + + // Phase 1 "GROUND FIGHT" + if(Phase == 1) + { + if(Movement) + { + DoStartMovement(m_creature->getVictim()); + Movement = false; + } + + if (BellowingRoarTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_BELLOWING_ROAR); + BellowingRoarTimer = 30000+rand()%10000 ; //Timer + }else BellowingRoarTimer -= diff; + + if (SmolderingBreathTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SMOLDERING_BREATH); + SmolderingBreathTimer = 20000;//timer + }else SmolderingBreathTimer -= diff; + + if (CharredEarthTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target,SPELL_CHARRED_EARTH); + CharredEarthTimer = 20000; //timer + }else CharredEarthTimer -= diff; + + if (TailSweepTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (!m_creature->HasInArc( M_PI, target)) + DoCast(target,SPELL_TAIL_SWEEP); + TailSweepTimer = 15000;//timer + }else TailSweepTimer -= diff; + + if (SearingCindersTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target,SPELL_SEARING_CINDERS); + SearingCindersTimer = 10000; //timer + }else SearingCindersTimer -= diff; + + uint32 Prozent; + Prozent = (m_creature->GetHealth()*100) / m_creature->GetMaxHealth(); + + if (Prozent < 75 && FlyCount == 0) // first take off 75% + TakeOff(); + + if (Prozent < 50 && FlyCount == 1) // secound take off 50% + TakeOff(); + + if (Prozent < 25 && FlyCount == 2) // third take off 25% + TakeOff(); + + DoMeleeAttackIfReady(); + } + + //Phase 2 "FLYING FIGHT" + if (Phase == 2) + { + if (!RainBones) + { + if (!Skeletons) + { + DoCast(m_creature->getVictim(), SPELL_SUMMON_SKELETON); + DoCast(m_creature->getVictim(), SPELL_SUMMON_SKELETON); + DoCast(m_creature->getVictim(), SPELL_SUMMON_SKELETON); + Skeletons = true; + } + + if (RainofBonesTimer < diff && !RainBones) // only once at the beginning of phase 2 + { + DoCast(m_creature->getVictim(),SPELL_RAIN_OF_BONES); + RainBones = true; + SmokingBlastTimer = 20000; + }else RainofBonesTimer -= diff; + + if (DistractingAshTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target,SPELL_DISTRACTING_ASH); + DistractingAshTimer = 2000;//timer wrong + }else DistractingAshTimer -= diff; + } + + if (RainBones) + { + if (SmokingBlastTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SMOKING_BLAST); + SmokingBlastTimer = 1500 ; //timer wrong + }else SmokingBlastTimer -= diff; + } + + if (FireballBarrageTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_FARTHEST, 0)) + DoCast(target,SPELL_FIREBALL_BARRAGE); + FireballBarrageTimer = 20000; //Timer + }else FireballBarrageTimer -= diff; + + if (FlyTimer < diff) //landing + { + if(rand()%2 == 0) + DoYell(YELL_LAND_PHASE_1, LANG_UNIVERSAL, NULL); + else + DoYell(YELL_LAND_PHASE_2, LANG_UNIVERSAL, NULL); + + (*m_creature).GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MovePoint(3,IntroWay[3][0],IntroWay[3][1],IntroWay[3][2]); + + Flying = true; + }else FlyTimer -= diff; + } + } +}; + +CreatureAI* GetAI_boss_nightbane(Creature *_Creature) +{ + return new boss_nightbaneAI (_Creature); +} + +void AddSC_boss_nightbane() +{ + Script *newscript; + newscript = new Script; + newscript->Name="boss_nightbane"; + newscript->GetAI = &GetAI_boss_nightbane; + newscript->RegisterSelf(); +}
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h b/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h index 78c1c488637..29660dd6426 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h +++ b/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h @@ -31,6 +31,8 @@ #define DATA_GAMEOBJECT_GAME_DOOR 24 #define DATA_GAMEOBJECT_GAME_EXIT_DOOR 25 #define DATA_IMAGE_OF_MEDIVH 26 +#define DATA_MASTERS_TERRACE_DOOR_1 27 +#define DATA_MASTERS_TERRACE_DOOR_2 28 // Opera Performances #define EVENT_OZ 1 diff --git a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp index 5af12a4fb0b..1d2760be73c 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp @@ -59,7 +59,8 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance uint64 MassiveDoor; // Door at Netherspite uint64 GamesmansDoor; // Door before Chess uint64 GamesmansExitDoor; // Door after Chess - uint64 NetherspaceDoor; // Door at Malchezaar + uint64 NetherspaceDoor; // Door at Malchezaar + uint64 MastersTerraceDoor[2]; uint64 ImageGUID; @@ -84,6 +85,8 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance GamesmansDoor = 0; GamesmansExitDoor = 0; NetherspaceDoor = 0; + MastersTerraceDoor[0]= 0; + MastersTerraceDoor[1]= 0; ImageGUID = 0; } @@ -146,6 +149,8 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance case DATA_GAMEOBJECT_GAME_DOOR: return GamesmansDoor; case DATA_GAMEOBJECT_GAME_EXIT_DOOR: return GamesmansExitDoor; case DATA_GAMEOBJECT_NETHER_DOOR: return NetherspaceDoor; + case DATA_MASTERS_TERRACE_DOOR_1: return MastersTerraceDoor[0]; + case DATA_MASTERS_TERRACE_DOOR_2: return MastersTerraceDoor[1]; } return 0; @@ -199,6 +204,8 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance case 184276: GamesmansDoor = go->GetGUID(); break; case 184277: GamesmansExitDoor = go->GetGUID(); break; case 185134: NetherspaceDoor = go->GetGUID(); break; + case 184274: MastersTerraceDoor[0] = go->GetGUID(); break; + case 184280: MastersTerraceDoor[1] = go->GetGUID(); break; } switch(OperaEvent) diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp index 32fd7197731..fde6b1f82ed 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp @@ -16,35 +16,29 @@ /* ScriptData SDName: Boss_Anubrekhan -SD%Complete: 100 +SD%Complete: 70 SDComment: SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO1 "Just a little taste..." -#define SAY_AGGRO2 "There is no way out." -#define SAY_AGGRO3 "Yes, Run! It makes the blood pump faster!" -#define SAY_GREET "Ahh... welcome to my parlor" -#define SAY_TAUNT1 "I hear little hearts beating. Yesss... beating faster now. Soon the beating will stop." -#define SAY_TAUNT2 "Where to go? What to do? So many choices that all end in pain, end in death." -#define SAY_TAUNT3 "Which one shall I eat first? So difficult to choose... the all smell so delicious." -#define SAY_TAUNT4 "Closer now... tasty morsels. I've been too long without food. Without blood to drink." -#define SAY_SLAY "Shh... it will all be over soon." - -#define SOUND_AGGRO1 8785 -#define SOUND_AGGRO2 8786 -#define SOUND_AGGRO3 8787 -#define SOUND_GREET 8788 -#define SOUND_TAUNT1 8790 -#define SOUND_TAUNT2 8791 -#define SOUND_TAUNT3 8792 -#define SOUND_TAUNT4 8793 -#define SOUND_SLAY 8789 +#define SAY_GREET -1533000 +#define SAY_AGGRO1 -1533001 +#define SAY_AGGRO2 -1533002 +#define SAY_AGGRO3 -1533003 +#define SAY_TAUNT1 -1533004 +#define SAY_TAUNT2 -1533005 +#define SAY_TAUNT3 -1533006 +#define SAY_TAUNT4 -1533007 +#define SAY_SLAY -1533008 #define SPELL_IMPALE 28783 //May be wrong spell id. Causes more dmg than I expect +#define H_SPELL_IMPALE 56090 #define SPELL_LOCUSTSWARM 28785 //This is a self buff that triggers the dmg debuff +#define H_SPELL_LOCUSTSWARM 54021 + +//invalid #define SPELL_SUMMONGUARD 29508 //Summons 1 crypt guard at targeted location #define SPELL_SELF_SPAWN_5 29105 //This spawns 5 corpse scarabs ontop of us (most likely the player casts this on death) @@ -74,89 +68,35 @@ struct TRINITY_DLL_DECL boss_anubrekhanAI : public ScriptedAI if (rand()%5) return; - DoYell(SAY_SLAY, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_SLAY); + DoScriptText(SAY_SLAY, m_creature); } void Aggro(Unit *who) { switch(rand()%3) { - case 0: - DoYell(SAY_AGGRO1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_AGGRO1); - break; - case 1: - DoYell(SAY_AGGRO2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_AGGRO2); - break; - case 2: - DoYell(SAY_AGGRO3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_AGGRO3); - break; + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; } } void MoveInLineOfSight(Unit *who) { - if (!m_creature->getVictim() && who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who)) - { - if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) - return; - - float attackRadius = m_creature->GetAttackDistance(who); - if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) - { - if (!InCombat) - { - switch(rand()%3) - { - case 0: - DoYell(SAY_AGGRO1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_AGGRO1); - break; - case 1: - DoYell(SAY_AGGRO2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_AGGRO2); - break; - case 2: - DoYell(SAY_AGGRO3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_AGGRO3); - break; - } - } - //who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(who); - } - else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f)) - { + if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f)) + { switch(rand()%5) { - case 0: - DoYell(SAY_TAUNT1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_TAUNT1); - break; - case 1: - DoYell(SAY_TAUNT2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_TAUNT2); - break; - case 2: - DoYell(SAY_TAUNT3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_TAUNT3); - break; - case 3: - DoYell(SAY_TAUNT4, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_TAUNT4); - break; - case 4: - DoYell(SAY_GREET, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_GREET); - break; + case 0: DoScriptText(SAY_GREET, m_creature); break; + case 1: DoScriptText(SAY_TAUNT1, m_creature); break; + case 2: DoScriptText(SAY_TAUNT2, m_creature); break; + case 3: DoScriptText(SAY_TAUNT3, m_creature); break; + case 4: DoScriptText(SAY_TAUNT4, m_creature); break; } HasTaunted = true; } - } + ScriptedAI::MoveInLineOfSight(who); } void UpdateAI(const uint32 diff) @@ -171,10 +111,8 @@ struct TRINITY_DLL_DECL boss_anubrekhanAI : public ScriptedAI //Do NOT cast it when we are afflicted by locust swarm if (!m_creature->HasAura(SPELL_LOCUSTSWARM,1)) { - Unit* target = NULL; - - target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target)DoCast(target,SPELL_IMPALE); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_IMPALE); } Impale_Timer = 15000; diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp index 3a457ec5afb..7a6d49ff417 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp @@ -23,29 +23,20 @@ EndScriptData */ #include "precompiled.h" -#define SAY_GREET "Your old lives, your mortal desires, mean nothing. You are acolytes of the master now, and you will serve the cause without question! The greatest glory is to die in the master's service!" -#define SAY_AGGRO1 "Slay them in the master's name!" -#define SAY_AGGRO2 "You cannot hide from me!" -#define SAY_AGGRO3 "Kneel before me, worm!" -#define SAY_AGGRO4 "Run while you still can!" -#define SAY_SLAY1 "You have failed!" -#define SAY_SLAY2 "Pathetic wretch!" -#define SAY_DEATH "The master... will avenge me!" -#define SAY_RANDOM_AGGRO "???" - -#define SOUND_GREET 8799 -#define SOUND_AGGRO1 8794 -#define SOUND_AGGRO2 8795 -#define SOUND_AGGRO3 8796 -#define SOUND_AGGRO4 8797 -#define SOUND_SLAY1 8800 -#define SOUND_SLAY2 8801 -#define SOUND_DEATH 8798 -#define SOUND_RANDOM_AGGRO 8955 +#define SAY_GREET -1533009 +#define SAY_AGGRO1 -1533010 +#define SAY_AGGRO2 -1533011 +#define SAY_AGGRO3 -1533012 +#define SAY_AGGRO4 -1533013 +#define SAY_SLAY1 -1533014 +#define SAY_SLAY2 -1533015 +#define SAY_DEATH -1533016 #define SPELL_POSIONBOLT_VOLLEY 28796 +#define H_SPELL_POSIONBOLT_VOLLEY 54098 +#define SPELL_ENRAGE 28798 +#define H_SPELL_ENRAGE 54100 #define SPELL_RAINOFFIRE 28794 //Not sure if targeted AoEs work if casted directly upon a player -#define SPELL_ENRAGE 26527 struct TRINITY_DLL_DECL boss_faerlinaAI : public ScriptedAI { @@ -68,90 +59,36 @@ struct TRINITY_DLL_DECL boss_faerlinaAI : public ScriptedAI { switch (rand()%4) { - case 0: - DoYell(SAY_AGGRO1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO1); - break; - case 1: - DoYell(SAY_AGGRO2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO2); - break; - case 2: - DoYell(SAY_AGGRO3,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO3); - break; - case 3: - DoYell(SAY_AGGRO4,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO4); - break; + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + case 3: DoScriptText(SAY_AGGRO4, m_creature); break; } } void MoveInLineOfSight(Unit *who) { - if (!m_creature->getVictim() && who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who)) - { - if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) - return; - - float attackRadius = m_creature->GetAttackDistance(who); - if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) - { - //Say our dialog on initial aggro - if (!InCombat) - { - switch (rand()%4) - { - case 0: - DoYell(SAY_AGGRO1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO1); - break; - case 1: - DoYell(SAY_AGGRO2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO2); - break; - case 2: - DoYell(SAY_AGGRO3,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO3); - break; - case 3: - DoYell(SAY_AGGRO4,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO4); - break; - } - } - - //who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(who); - } - else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f)) - { - DoYell(SAY_GREET, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_GREET); + if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f)) + { + DoScriptText(SAY_GREET, m_creature); HasTaunted = true; - } + } + ScriptedAI::MoveInLineOfSight(who); } void KilledUnit(Unit* victim) { switch (rand()%2) { - case 0: - DoYell(SAY_SLAY1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY1); - break; - case 1: - DoYell(SAY_SLAY2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY2); - break; + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; } } void JustDied(Unit* Killer) { - DoYell(SAY_DEATH,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_DEATH); + DoScriptText(SAY_DEATH, m_creature); } void UpdateAI(const uint32 diff) @@ -169,10 +106,8 @@ struct TRINITY_DLL_DECL boss_faerlinaAI : public ScriptedAI //RainOfFire_Timer if (RainOfFire_Timer < diff) { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target) DoCast(target,SPELL_RAINOFFIRE); - + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_RAINOFFIRE); RainOfFire_Timer = 16000; }else RainOfFire_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_feugen.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_feugen.cpp deleted file mode 100644 index d7f7de9eaca..00000000000 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_feugen.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Boss_Feugen -SD%Complete: 0 -SDComment: Merge with Thaddius -SDCategory: Naxxramas -EndScriptData */ - -//Feugen -//8801 aggro Feed you to master! -//8804 slay Feugen make master happy! -//8803 death No... more... Feugen... - -#include "precompiled.h" - -#define SPELL_WARSTOMP 28125 -#define SPELL_MANABURN 28135 -#define SPELL_CHAIN_LIGHTNING 28900 diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_four_horsemen.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_four_horsemen.cpp new file mode 100644 index 00000000000..33582c0a3c1 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_four_horsemen.cpp @@ -0,0 +1,401 @@ +/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + /* ScriptData + SDName: Boss_Four_Horsemen + SD%Complete: 75 + SDComment: Lady Blaumeux, Thane Korthazz, Sir Zeliek, Baron Rivendare + SDCategory: Naxxramas + EndScriptData */ + + #include "precompiled.h" + + //all horsemen + #define SPELL_SHIELDWALL 29061 + #define SPELL_BESERK 26662 + + //lady blaumeux + #define SAY_BLAU_AGGRO -1533044 + #define SAY_BLAU_TAUNT1 -1533045 + #define SAY_BLAU_TAUNT2 -1533046 + #define SAY_BLAU_TAUNT3 -1533047 + #define SAY_BLAU_SPECIAL -1533048 + #define SAY_BLAU_SLAY -1533049 + #define SAY_BLAU_DEATH -1533050 + + #define SPELL_MARK_OF_BLAUMEUX 28833 + #define SPELL_UNYILDING_PAIN 57381 + #define SPELL_VOIDZONE 28863 + #define H_SPELL_VOIDZONE 57463 + #define SPELL_SHADOW_BOLT 57374 + #define H_SPELL_SHADOW_BOLT 57464 + + #define C_SPIRIT_OF_BLAUMEUX 16776 + + struct TRINITY_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI + { + boss_lady_blaumeuxAI(Creature *c) : ScriptedAI(c) {Reset();} + + uint32 Mark_Timer; + uint32 VoidZone_Timer; + bool ShieldWall1; + bool ShieldWall2; + + void Reset() + { + Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. + VoidZone_Timer = 12000; // right + ShieldWall1 = true; + ShieldWall2 = true; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_BLAU_AGGRO, m_creature); + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(SAY_BLAU_SLAY, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_BLAU_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) + return; + + // Mark of Blaumeux + if (Mark_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MARK_OF_BLAUMEUX); + Mark_Timer = 12000; + }else Mark_Timer -= diff; + + // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds + if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + if(ShieldWall1) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall1 = false; + } + } + if (ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + { + if (ShieldWall2) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall2 = false; + } + } + + // Void Zone + if (VoidZone_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_VOIDZONE); + VoidZone_Timer = 12000; + }else VoidZone_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI_boss_lady_blaumeux(Creature *_Creature) + { + return new boss_lady_blaumeuxAI (_Creature); + } + + //baron rivendare + #define SAY_RIVE_AGGRO1 -1533065 + #define SAY_RIVE_AGGRO2 -1533066 + #define SAY_RIVE_AGGRO3 -1533067 + #define SAY_RIVE_SLAY1 -1533068 + #define SAY_RIVE_SLAY2 -1533069 + #define SAY_RIVE_SPECIAL -1533070 + #define SAY_RIVE_TAUNT1 -1533071 + #define SAY_RIVE_TAUNT2 -1533072 + #define SAY_RIVE_TAUNT3 -1533073 + #define SAY_RIVE_DEATH -1533074 + + #define SPELL_MARK_OF_RIVENDARE 28834 + #define SPELL_UNHOLY_SHADOW 28882 + #define H_SPELL_UNHOLY_SHADOW 57369 + + #define C_SPIRIT_OF_RIVENDARE 0 //creature entry not known yet + + struct TRINITY_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI + { + boss_rivendare_naxxAI(Creature *c) : ScriptedAI(c) {Reset();} + + void Reset() + { + } + + void Aggro(Unit *who) + { + switch(rand()%3) + { + case 0: DoScriptText(SAY_RIVE_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_RIVE_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_RIVE_AGGRO3, m_creature); break; + } + } + + void KilledUnit(Unit* Victim) + { + switch(rand()%2) + { + case 0: DoScriptText(SAY_RIVE_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_RIVE_SLAY2, m_creature); break; + } + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_RIVE_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI_boss_rivendare_naxx(Creature *_Creature) + { + return new boss_rivendare_naxxAI (_Creature); + } + + //thane korthazz + #define SAY_KORT_AGGRO -1533051 + #define SAY_KORT_TAUNT1 -1533052 + #define SAY_KORT_TAUNT2 -1533053 + #define SAY_KORT_TAUNT3 -1533054 + #define SAY_KORT_SPECIAL -1533055 + #define SAY_KORT_SLAY -1533056 + #define SAY_KORT_DEATH -1533057 + + #define SPELL_MARK_OF_KORTHAZZ 28832 + #define SPELL_METEOR 26558 // m_creature->getVictim() auto-area spell but with a core problem + + #define C_SPIRIT_OF_KORTHAZZ 16778 + + struct TRINITY_DLL_DECL boss_thane_korthazzAI : public ScriptedAI + { + boss_thane_korthazzAI(Creature *c) : ScriptedAI(c) {Reset();} + + uint32 Mark_Timer; + uint32 Meteor_Timer; + bool ShieldWall1; + bool ShieldWall2; + + void Reset() + { + Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. + Meteor_Timer = 30000; // wrong + ShieldWall1 = true; + ShieldWall2 = true; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_KORT_AGGRO, m_creature); + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(SAY_KORT_SLAY, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_KORT_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) + return; + + // Mark of Korthazz + if (Mark_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MARK_OF_KORTHAZZ); + Mark_Timer = 12000; + }else Mark_Timer -= diff; + + // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds + if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + if (ShieldWall1) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall1 = false; + } + } + if (ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + { + if (ShieldWall2) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall2 = false; + } + } + + // Meteor + if (Meteor_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_METEOR); + Meteor_Timer = 20000; // wrong + }else Meteor_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI_boss_thane_korthazz(Creature *_Creature) + { + return new boss_thane_korthazzAI (_Creature); + } + + //sir zeliek + #define SAY_ZELI_AGGRO -1533058 + #define SAY_ZELI_TAUNT1 -1533059 + #define SAY_ZELI_TAUNT2 -1533060 + #define SAY_ZELI_TAUNT3 -1533061 + #define SAY_ZELI_SPECIAL -1533062 + #define SAY_ZELI_SLAY -1533063 + #define SAY_ZELI_DEATH -1533064 + + #define SPELL_MARK_OF_ZELIEK 28835 + #define SPELL_HOLY_WRATH 28883 + #define H_SPELL_HOLY_WRATH 57466 + #define SPELL_HOLY_BOLT 57376 + #define H_SPELL_HOLY_BOLT 57465 + + #define C_SPIRIT_OF_ZELIREK 16777 + + struct TRINITY_DLL_DECL boss_sir_zeliekAI : public ScriptedAI + { + boss_sir_zeliekAI(Creature *c) : ScriptedAI(c) {Reset();} + + uint32 Mark_Timer; + uint32 HolyWrath_Timer; + bool ShieldWall1; + bool ShieldWall2; + + void Reset() + { + Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. + HolyWrath_Timer = 12000; // right + ShieldWall1 = true; + ShieldWall2 = true; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_ZELI_AGGRO, m_creature); + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(SAY_ZELI_SLAY, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_ZELI_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) + return; + + // Mark of Zeliek + if (Mark_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MARK_OF_ZELIEK); + Mark_Timer = 12000; + }else Mark_Timer -= diff; + + // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds + if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + if (ShieldWall1) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall1 = false; + } + } + if (ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + { + if (ShieldWall2) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall2 = false; + } + } + + // Holy Wrath + if (HolyWrath_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_HOLY_WRATH); + HolyWrath_Timer = 12000; + }else HolyWrath_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI_boss_sir_zeliek(Creature *_Creature) + { + return new boss_sir_zeliekAI (_Creature); + } + + void AddSC_boss_four_horsemen() + { + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_lady_blaumeux"; + newscript->GetAI = &GetAI_boss_lady_blaumeux; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_rivendare_naxx"; + newscript->GetAI = &GetAI_boss_rivendare_naxx; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_thane_korthazz"; + newscript->GetAI = &GetAI_boss_thane_korthazz; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_sir_zeliek"; + newscript->GetAI = &GetAI_boss_sir_zeliek; + newscript->RegisterSelf(); + }
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_gothik.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_gothik.cpp index 65e7a9d1387..8d6b986ab31 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_gothik.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_gothik.cpp @@ -21,18 +21,17 @@ SDComment: Placeholder SDCategory: Naxxramas EndScriptData */ -//Gothik -//8806 spch - Foolishly you have sought your own demise. Brazenly you have disregarded powers beyond your understanding. You have fought hard to invade the realm of the harvester. Now there is only one way out - to walk the lonely path of the damned. -//8808 tlpt - I have waited long enough! Now, you face the harvester of souls! -//8806 slay - Death is the only escape. -//8805 death - I... am... undone! - #include "precompiled.h" +#define SAY_SPEECH -1533040 +#define SAY_KILL -1533041 +#define SAY_DEATH -1533042 +#define SAY_TELEPORT -1533043 + //Gothik #define SPELL_HARVESTSOUL 28679 -#define SPELL_SHADOWBOLT 19729 - +#define SPELL_SHADOWBOLT 29317 +#define H_SPELL_SHADOWBOLT 56405 //Unrelenting Trainee #define SPELL_EAGLECLAW 30285 #define SPELL_KNOCKDOWN_PASSIVE 6961 diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp index deeac1a0b65..8566c7a16b5 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Highlord_Mograine SD%Complete: 100 -SDComment: +SDComment: SCRIPT OBSOLETE SDCategory: Naxxramas EndScriptData */ diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp index 4426a0f83e3..a5c95f34e04 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp @@ -23,6 +23,44 @@ EndScriptData */ #include "precompiled.h" +//when shappiron dies. dialog between kel and lich king (in this order) +#define SAY_SAPP_DIALOG1 -1533084 +#define SAY_SAPP_DIALOG2_LICH -1533085 +#define SAY_SAPP_DIALOG3 -1533086 +#define SAY_SAPP_DIALOG4_LICH -1533087 +#define SAY_SAPP_DIALOG5 -1533088 + +//when cat dies +#define SAY_CAT_DIED -1533089 + +//when each of the 4 wing bosses dies +#define SAY_TAUNT1 -1533090 +#define SAY_TAUNT2 -1533091 +#define SAY_TAUNT3 -1533092 +#define SAY_TAUNT4 -1533093 + +#define SAY_SUMMON_MINIONS -1533105 //start of phase 1 + +#define SAY_AGGRO1 -1533094 //start of phase 2 +#define SAY_AGGRO2 -1533095 +#define SAY_AGGRO3 -1533096 + +#define SAY_SLAY1 -1533097 +#define SAY_SLAY2 -1533098 + +#define SAY_DEATH -1533099 + +#define SAY_CHAIN1 -1533100 +#define SAY_CHAIN2 -1533101 +#define SAY_FROST_BLAST -1533102 + +#define SAY_REQUEST_AID -1533103 //start of phase 3 +#define SAY_ANSWER_REQUEST -1533104 //lich king answer + +#define SAY_SPECIAL1_MANA_DET -1533106 +#define SAY_SPECIAL3_MANA_DET -1533107 +#define SAY_SPECIAL2_DISPELL -1533108 + //***THIS SCRIPTS IS UNDER DEVELOPMENT*** /* DATA. @@ -37,18 +75,6 @@ Need DISPELL efect I also don't know the emotes */ -//Kel'thuzad. Still don't know where to use these... -//Dialog -//8878 dialog01 - Our preparations continue as planned, master. -//8881 lich_naxx_dialog01 - It is good that you serve me so faithfully. Soon, all will serve the Lich King and in the end, you shall be rewarded...so long as you do not falter. -//8879 dialog02 - I see no complications... Wait... What is this? -//8882 lich_naxx_dialog03 - Your security measures have failed! See to this interruption immediately! -//8880 dialog03 - Yes, master! -//Bigglesworth death -//No!!! A curse upon you, interlopers! The armies of the Lich King will hunt you down. You will not escape your fate... -//slay -//8818 - //common needed defines #define NAXXRAMAS_MAP 533 //Positional defines @@ -114,60 +140,15 @@ I also don't know the emotes //spells to be casted #define SPELL_FROST_BOLT 28478 +#define H_SPELL_FROST_BOLT 55802 #define SPELL_FROST_BOLT_NOVA 28479 +#define H_SPELL_FROST_BOLT_NOVA 55807 + #define SPELL_CHAINS_OF_KELTHUZAD 28410 #define SPELL_MANA_DETONATION 27819 #define SPELL_SHADOW_FISURE 27810 #define SPELL_FROST_BLAST 27808 -//On Aggro -#define SAY_ARRIVAL1 "PRAY FOR MERCY!" -#define SOUND_ARRIVAL1 8809 -#define SAY_ARRIVAL3 "SCREAM YOR DYING BREATH!" -#define SOUND_ARRIVAL3 8810 -#define SAY_ARRIVAL5 "THE END IS UPON YOU!" -#define SOUND_ARRIVAL5 8811 - -//On Summon -#define SAY_REINFORCEMENTS1 "MINIONS, SERVANTS, SOLDIERS OF THE COLD DARK, OBEY THE CALL OF KEL'THUZAD!" -#define SOUND_REINFORCEMENTS1 8819 -#define SAY_REINFORCEMENTS2 "MASTER, I REQUIRE AID!" -#define SOUND_REINFORCEMENTS2 8816 -#define SAY_LICH_NAXX_SUMMON "VERY WELL. WARRIORS OF THE FROZEN WASTES RISE UP!. I COMMAND YOU TO FIGHT, KILL AND DIE AND DIE FOR YOUR MASTER! LET NONE SURVIVE!" -#define SOUND_LICH_NAXX_SUMMON 8824 - -//Random 1/4 taunt said when player enters 300 yards -#define SAY_TAUNT01 "WHO DARES VIOLATE THE SACTITY OF MY DOMAIN? BE WARNED, ALL WHO TRASPASS HERE ARE DOOMED" -#define SOUND_TAUNT01 8820 -#define SAY_TAUNT02 "FOOLS, YOU THINK YOURSELVES TRIUMPHANT? YOU HAVE ONLY TAKEN ONE STEP CLOSER TO THE ABYSS!" -#define SOUND_TAUNT02 8821 -#define SAY_TAUNT03 "I GROW TIRED OF THESE GAMES. PROCEED, AND I WILL BANISH YOUR SOULS TO OBLIVION!" -#define SOUND_TAUNT03 8822 -#define SAY_TAUNT04 "YOU HAVE NO IDEA WHAT HORRORS LIE AHEAD. YOU HAVE SEEN NOTHING! THE FROZEN HEART OF NAXXRAMAS AWAITS YOU!" -#define SOUND_TAUNT04 8823 - -//On kill unit -#define SAY_SLAY "THE DARK VOID AWAITS YOU!" -#define SOUND_SLAY 8817 - -//Specials -#define SAY_FROST "I WILL FREEZE THE BLOOD IN YOUR VEINS!" -#define SOUND_FROST 8815 -#define SAY_CHAIN1 "YOUR SOUL IS BOUND TO ME NOW!" -#define SOUND_CHAIN1 8812 -#define SAY_CHAIN2 "THERE WILL BE NO ESCAPE!" -#define SOUND_CHAIN2 8813 -#define SAY_SPECIAL1 "YOUR PETTY MAGICS ARE NO CHALLENGE TO THE MIGTH OF THE SCOURGE" -#define SOUND_SPECIAL1 9088 -#define SAY_SPECIAL2 "ENOUGH! I GROW TIRED OF THESE DISTRACTIONS!" -#define SOUND_SPECIAL2 9090 -#define SAY_DISPEL "FOOLS, YOU HAVE SPREAD YOUR POWERS TOO THIN. BE FREE, MY MINIONS!" -#define SOUND_DISPEL 9089 - -//On death -#define SAY_DEATH "DO NOT REJOICE... YOUR VICTORY IS A HOLLOW ONE... FOR I SHALL RETURN WITH POWERS BEYOND YOUR IMAGINING!" -#define SOUND_DEATH 8814 - struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI { boss_kelthuzadAI(Creature* c) : ScriptedAI(c) @@ -206,6 +187,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI GuardiansOfIcecrown_Timer = 5000; //5 seconds for summoning each Guardian of Icecrown in phase 3 for(int i=0; i<5; i++) + { if(GuardiansOfIcecrown[i]) { //delete creature @@ -214,6 +196,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI pUnit->DealDamage(pUnit, pUnit->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); GuardiansOfIcecrown[i] = 0; } + } Phase1_Timer = 310000; //Phase 1 lasts 5 minutes and 10 seconds Phase2 = false; @@ -222,17 +205,15 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI void KilledUnit() { - if (rand()%5) - return; - - DoYell(SAY_SLAY, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_SLAY); + if (rand()%2) + DoScriptText(SAY_SLAY1, m_creature); + else + DoScriptText(SAY_SLAY2, m_creature); } void JustDied(Unit* Killer) { - DoYell(SAY_DEATH,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_DEATH); + DoScriptText(SAY_DEATH, m_creature); for(int i=0; i<5; i++) if(GuardiansOfIcecrown[i]) { @@ -281,47 +262,19 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI } } - void SayInitialAggro() //randomly select 1 of 3 say for aggro - { - switch(rand()%3) - { - case 0: - DoYell(SAY_ARRIVAL1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_ARRIVAL1); - break; - case 1: - DoYell(SAY_ARRIVAL3,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_ARRIVAL3); - break; - case 2: - DoYell(SAY_ARRIVAL5,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_ARRIVAL5); - break; - } - } - void Aggro(Unit* who) { switch(rand()%3) { - case 0: - DoYell(SAY_ARRIVAL1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_ARRIVAL1); - break; - case 1: - DoYell(SAY_ARRIVAL3,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_ARRIVAL3); - break; - case 2: - DoYell(SAY_ARRIVAL5,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_ARRIVAL5); - break; + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; } } void UpdateAI(const uint32 diff) { - if(!m_creature->SelectHostilTarget()) + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; if(m_creature->getVictim() && m_creature->isAlive()) @@ -330,118 +283,69 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI if(FrostBolt_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_FROST_BOLT); - - if(rand()%2 == 0) - { - DoYell(SAY_FROST,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_FROST); - } //Cast again on time FrostBolt_Timer = (rand()%60)*1000; - } - else FrostBolt_Timer -= diff; + }else FrostBolt_Timer -= diff; //Check for Frost Bolt Nova if(FrostBoltNova_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_FROST_BOLT_NOVA); - - if(rand()%2 == 0) - { - DoYell(SAY_FROST,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_FROST); - } - FrostBoltNova_Timer = 15000; - } - else FrostBoltNova_Timer -= diff; + }else FrostBoltNova_Timer -= diff; //Check for Chains Of Kelthuzad if(ChainsOfKelthuzad_Timer < diff) { - DoCast(m_creature->getVictim(),SPELL_CHAINS_OF_KELTHUZAD); + //DoCast(m_creature->getVictim(),SPELL_CHAINS_OF_KELTHUZAD); - if(rand()%2 == 0) - if(rand()%2 == 0) - { - DoYell(SAY_CHAIN1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_CHAIN1); - } - else - { - DoYell(SAY_CHAIN2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_CHAIN2); - } - - //cast again on time + //if(rand()%2 == 0) + //DoScriptText(SAY_CHAIN1, m_creature); + //else + //DoScriptText(SAY_CHAIN2, m_creature); ChainsOfKelthuzad_Timer = (rand()%30+30)*1000; - } - else ChainsOfKelthuzad_Timer -= diff; + }else ChainsOfKelthuzad_Timer -= diff; //Check for Mana Detonation if(ManaDetonation_Timer < diff) { //time to cast - //DoCast(m_creature->getVictim(),SPELL_MANA_DETONATION); + DoCast(m_creature->getVictim(),SPELL_MANA_DETONATION); - if(rand()%2 == 0) - { - DoYell(SAY_SPECIAL1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SPECIAL1); - } + if (rand()%2) + DoScriptText(SAY_SPECIAL1_MANA_DET, m_creature); ManaDetonation_Timer = 20000; - } - else ManaDetonation_Timer -= diff; + }else ManaDetonation_Timer -= diff; //Check for Shadow Fissure if(ShadowFisure_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_SHADOW_FISURE); - if(rand()%2 == 0) - { - DoYell(SAY_SPECIAL2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SPECIAL2); - } - + if (rand()%2) + DoScriptText(SAY_SPECIAL3_MANA_DET, m_creature); ShadowFisure_Timer = 25000; - } - else ShadowFisure_Timer -= diff; + }else ShadowFisure_Timer -= diff; //Check for Frost Blast if(FrostBlast_Timer < diff) { //time to cast - //DoCast(m_creature->getVictim(),SPELL_FROST_BLAST); + DoCast(m_creature->getVictim(),SPELL_FROST_BLAST); if(rand()%2 == 0) - { - DoYell(SAY_FROST,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_FROST); - } - + DoScriptText(SAY_FROST_BLAST, m_creature); FrostBlast_Timer = (rand()%30+30)*1000; - } - else FrostBlast_Timer -= diff; + }else FrostBlast_Timer -= diff; //start phase 3 when we are 40% health if(!Phase3 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) { Phase3 = true; - switch(rand()%2) - { - case 1: - DoYell(SAY_REINFORCEMENTS1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_REINFORCEMENTS1); - break; - case 2: - DoYell(SAY_REINFORCEMENTS2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_REINFORCEMENTS2); - break; - } + DoScriptText(SAY_REQUEST_AID, m_creature); //here Lich King should respond to KelThuzad but I don't know which creature to make talk //so for now just make Kelthuzad says it. - DoPlaySoundToSet(m_creature,SOUND_LICH_NAXX_SUMMON); + DoScriptText(SAY_ANSWER_REQUEST, m_creature); } if(Phase3 && (GuardiansOfIcecrown_Count < 5)) @@ -530,13 +434,10 @@ CreatureAI* GetAI_boss_kelthuzadAI(Creature *_Creature) void AddSC_boss_kelthuzad() { - //This script is disabled until it has been throughly tested - /* Script *newscript; newscript = new Script; newscript->Name="boss_kelthuzad"; newscript->GetAI = &GetAI_boss_kelthuzadAI; newscript->RegisterSelf(); - */ } diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_lady_blaumeux.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_lady_blaumeux.cpp deleted file mode 100644 index 5b10e5b067a..00000000000 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_lady_blaumeux.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Boss_Lady_Blaumeux -SD%Complete: 100 -SDComment: -SDCategory: Naxxramas -EndScriptData */ - -#include "precompiled.h" - -//All horsemen -#define SPELL_SHIELDWALL 29061 -#define SPELL_BESERK 26662 - -// lady blaumeux -#define SPELL_MARK_OF_BLAUMEUX 28833 -#define SPELL_VOIDZONE 28863 - -#define SAY_AGGRO "Defend youself!" -#define SAY_TAUNT1 "Come, Zeliek, do not drive them out. Not before we've had our fun." -#define SAY_TAUNT2 "I do hope they stay alive long enough for me to... introduce myself." -#define SAY_TAUNT3 "The first kill goes to me! Anyone care to wager?" -#define SAY_SPECIAL "Your life is mine!" -#define SAY_SLAY "Who's next?" -#define SAY_DEATH "Tou... che!" - -#define SOUND_AGGRO 8892 -#define SOUND_TAUNT1 8896 -#define SOUND_TAUNT2 8897 -#define SOUND_TAUNT3 8898 -#define SOUND_SPECIAL 8895 -#define SOUND_SLAY 8894 -#define SOUND_DEATH 8893 - -#define SPIRIT_OF_BLAUMEUX 16776 - -struct TRINITY_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI -{ - boss_lady_blaumeuxAI(Creature *c) : ScriptedAI(c) {Reset();} - - uint32 Mark_Timer; - uint32 VoidZone_Timer; - bool ShieldWall1; - bool ShieldWall2; - - void Reset() - { - Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. - VoidZone_Timer = 12000; // right - ShieldWall1 = true; - ShieldWall2 = true; - } - - void InitialYell() - { - if(!InCombat) - { - DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO); - } - } - - void KilledUnit() - { - DoYell(SAY_SLAY,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY); - } - - void JustDied(Unit* Killer) - { - DoYell(SAY_DEATH,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_DEATH); - } - - void Aggro(Unit *who) - { - InitialYell(); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) - return; - - // Mark of Blaumeux - if(Mark_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_MARK_OF_BLAUMEUX); - Mark_Timer = 12000; - }else Mark_Timer -= diff; - - // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds - if(ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) - { - if(ShieldWall1) - { - DoCast(m_creature,SPELL_SHIELDWALL); - ShieldWall1 = false; - } - } - if(ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) - { - if(ShieldWall2) - { - DoCast(m_creature,SPELL_SHIELDWALL); - ShieldWall2 = false; - } - } - - // Void Zone - if(VoidZone_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_VOIDZONE); - VoidZone_Timer = 12000; - }else VoidZone_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_lady_blaumeux(Creature *_Creature) -{ - return new boss_lady_blaumeuxAI (_Creature); -} - -void AddSC_boss_lady_blaumeux() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_lady_blaumeux"; - newscript->GetAI = &GetAI_boss_lady_blaumeux; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp index 917eb00b35e..2062ab553f0 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp @@ -25,9 +25,14 @@ EndScriptData */ #define SPELL_WEBTRAP 28622 //Spell is normally used by the webtrap on the wall NOT by Maexxna #define SPELL_WEBSPRAY 29484 +#define H_SPELL_WEBSPRAY 54125 #define SPELL_POISONSHOCK 28741 +#define H_SPELL_POISONSHOCK 54122 #define SPELL_NECROTICPOISON 28776 -#define SPELL_ENRAGE 28747 +#define H_SPELL_NECROTICPOISON 54121 +#define SPELL_FRENZY 54123 +#define H_SPELL_FRENZY 54124 + #define SPELL_SUMMON_SPIDERLING 29434 #define LOC_X1 3546.796 @@ -212,7 +217,7 @@ struct TRINITY_DLL_DECL boss_maexxnaAI : public ScriptedAI //Enrage if not already enraged and below 30% if (!Enraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) { - DoCast(m_creature,SPELL_ENRAGE); + DoCast(m_creature,SPELL_FRENZY); Enraged = true; } diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp index f5497e77d5c..cb30ff7ad45 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp @@ -23,20 +23,22 @@ EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO1 "Glory to the master!" -#define SAY_AGGRO2 "Your life is forfeit!" -#define SAY_AGGRO3 "Die, trespasser!" -#define SAY_SUMMON "Rise, my soldiers! Rise and fight once more!" -#define SAY_SLAY1 "My task is done!" -#define SAY_SLAY2 "Breathe no more!" -#define SAY_DEATH "I will serve the master... in... death!" -#define SOUND_AGGRO1 8845 -#define SOUND_AGGRO2 8846 -#define SOUND_AGGRO3 8847 -#define SOUND_SUMMON 8851 -#define SOUND_SLAY1 8849 -#define SOUND_SLAY2 8850 -#define SOUND_DEATH 8848 +#define SAY_AGGRO1 -1533075 +#define SAY_AGGRO2 -1533076 +#define SAY_AGGRO3 -1533077 +#define SAY_SUMMON -1533078 +#define SAY_SLAY1 -1533079 +#define SAY_SLAY2 -1533080 +#define SAY_DEATH -1533081 + +#define SPELL_BLINK 29211 //29208, 29209 and 29210 too +#define SPELL_CRIPPLE 29212 +#define H_SPELL_CRIPPLE 54814 +#define SPELL_CURSE_PLAGUEBRINGER 28213 +#define H_SPELL_CURSE_PLAGUEBRINGER 54835 +#define SOUND_DEATH 8848 + +#define C_PLAGUED_WARRIOR 16984 // Teleport position of Noth on his balcony #define TELE_X 2631.370 @@ -44,12 +46,8 @@ EndScriptData */ #define TELE_Z 274.040 #define TELE_O 6.277 -#define SPELL_BLINK 29211 -#define SPELL_CRIPPLE 29212 -#define SPELL_CURSEPLAGUEBRINGER 28213 -#define SPELL_WRATHPLAGUEBRINGER 28214 - // IMPORTANT: BALCONY TELEPORT NOT ADDED YET! WILL BE ADDED SOON! +// Dev note 26.12.2008: When is soon? :) struct TRINITY_DLL_DECL boss_nothAI : public ScriptedAI { @@ -57,14 +55,12 @@ struct TRINITY_DLL_DECL boss_nothAI : public ScriptedAI uint32 Blink_Timer; uint32 Curse_Timer; - uint32 Wrath_Timer; uint32 Summon_Timer; void Reset() { Blink_Timer = 25000; Curse_Timer = 4000; - Wrath_Timer = 9000; Summon_Timer = 12000; } @@ -72,18 +68,9 @@ struct TRINITY_DLL_DECL boss_nothAI : public ScriptedAI { switch (rand()%3) { - case 0: - DoYell(SAY_AGGRO1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO1); - break; - case 1: - DoYell(SAY_AGGRO2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO2); - break; - case 2: - DoYell(SAY_AGGRO3,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO3); - break; + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; } } @@ -91,21 +78,20 @@ struct TRINITY_DLL_DECL boss_nothAI : public ScriptedAI { switch (rand()%2) { - case 0: - DoYell(SAY_SLAY1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY1); - break; - case 1: - DoYell(SAY_SLAY2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY2); - break; + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; } } + void JustSummoned(Creature* summoned) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + summoned->AddThreat(target,0.0f); + } + void JustDied(Unit* Killer) { - DoYell(SAY_DEATH,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_DEATH); + DoScriptText(SAY_DEATH, m_creature); } void UpdateAI(const uint32 diff) @@ -125,39 +111,17 @@ struct TRINITY_DLL_DECL boss_nothAI : public ScriptedAI //Curse_Timer if (Curse_Timer < diff) { - DoCast(m_creature->getVictim(),SPELL_CURSEPLAGUEBRINGER); + DoCast(m_creature->getVictim(),SPELL_CURSE_PLAGUEBRINGER); Curse_Timer = 28000; }else Curse_Timer -= diff; - //Wrath_Timer - if (Wrath_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_WRATHPLAGUEBRINGER); - Wrath_Timer = 18000; - }else Wrath_Timer -= diff; - //Summon_Timer if (Summon_Timer < diff) { - DoYell(SAY_SUMMON,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SUMMON); - - Unit* target = NULL; - Unit* SummonedSkeletons = NULL; - - SummonedSkeletons = m_creature->SummonCreature(16984,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - SummonedSkeletons = m_creature->SummonCreature(16984,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - SummonedSkeletons = m_creature->SummonCreature(16984,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - SummonedSkeletons = m_creature->SummonCreature(16984,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - SummonedSkeletons = m_creature->SummonCreature(16984,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - SummonedSkeletons = m_creature->SummonCreature(16984,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - - if (SummonedSkeletons) - { - target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target) - SummonedSkeletons->AddThreat(target,1.0f); - } + DoScriptText(SAY_SUMMON, m_creature); + + for(uint8 i = 0; i < 6; i++) + m_creature->SummonCreature(C_PLAGUED_WARRIOR,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); Summon_Timer = 30500; } else Summon_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp index 57b6f8bcdb1..07c3616473c 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp @@ -23,22 +23,18 @@ EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO1 "Patchwerk want to play!" -#define SAY_AGGRO2 "Kel'Thuzad make Patchwerk his Avatar of War!" -#define SAY_SLAY "No more play?" -#define SAY_DEATH "What happened to... Patch..." +#define SAY_AGGRO1 -1533017 +#define SAY_AGGRO2 -1533018 +#define SAY_SLAY -1533019 +#define SAY_DEATH -1533020 -#define SOUND_AGGRO1 8909 -#define SOUND_AGGRO2 8910 -#define SOUND_SLAY 8912 -#define SOUND_DEATH 8911 - -#define EMOTE_BERSERK "Patchwerk goes into a berserker rage!" -#define EMOTE_ENRAGE "Patchwerk becomes enraged!" +#define EMOTE_BERSERK -1533021 +#define EMOTE_ENRAGE -1533022 #define SPELL_HATEFULSTRIKE 28308 -#define SPELL_ENRAGE 29691 -#define SPELL_BERSERK 27680 +#define H_SPELL_HATEFULSTRIKE 59192 +#define SPELL_ENRAGE 2813 +#define SPELL_BERSERK 26662 #define SPELL_SLIMEBOLT 32309 struct TRINITY_DLL_DECL boss_patchwerkAI : public ScriptedAI @@ -63,27 +59,23 @@ struct TRINITY_DLL_DECL boss_patchwerkAI : public ScriptedAI if (rand()%5) return; - DoYell(SAY_SLAY, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_SLAY); + DoScriptText(SAY_SLAY, m_creature); } void JustDied(Unit* Killer) { - DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_DEATH); + DoScriptText(SAY_DEATH, m_creature); } void Aggro(Unit *who) { if (rand()%2) { - DoYell(SAY_AGGRO1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_AGGRO1); + DoScriptText(SAY_AGGRO1, m_creature); } else { - DoYell(SAY_AGGRO2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_AGGRO2); + DoScriptText(SAY_AGGRO2, m_creature); } } @@ -122,7 +114,7 @@ struct TRINITY_DLL_DECL boss_patchwerkAI : public ScriptedAI if (Enrage_Timer < diff) { DoCast(m_creature, SPELL_BERSERK); - DoTextEmote(EMOTE_BERSERK, m_creature->getVictim()); + DoScriptText(EMOTE_BERSERK, m_creature); Enrage_Timer = 300000; }else Enrage_Timer -= diff; @@ -138,7 +130,7 @@ struct TRINITY_DLL_DECL boss_patchwerkAI : public ScriptedAI if (!Enraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 5) { DoCast(m_creature,SPELL_ENRAGE); - DoTextEmote(EMOTE_ENRAGE,NULL); + DoScriptText(EMOTE_ENRAGE,NULL); Enraged = true; } diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp index cf5836032da..6937f96e8ca 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp @@ -23,6 +23,9 @@ EndScriptData */ #include "precompiled.h" +#define EMOTE_BREATH -1533082 +#define EMOTE_ENRAGE -1533083 + #define SPELL_ICEBOLT 28522 #define SPELL_FROST_BREATH 29318 #define SPELL_FROST_AURA 28531 @@ -72,11 +75,9 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(!m_creature->SelectHostilTarget()) + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - if(m_creature->getVictim() && m_creature->isAlive()) - { if(phase == 1) { if(FrostAura_Timer < diff) @@ -87,19 +88,15 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI if(LifeDrain_Timer < diff) { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM,0); - - DoCast(target,SPELL_LIFE_DRAIN); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_LIFE_DRAIN); LifeDrain_Timer = 24000; }else LifeDrain_Timer -= diff; if(Blizzard_Timer < diff) { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM,0); - - DoCast(target,SPELL_BLIZZARD); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_BLIZZARD); Blizzard_Timer = 20000; }else Blizzard_Timer -= diff; @@ -120,16 +117,14 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI landoff = false; }else Fly_Timer -= diff; } + } if (phase == 2) { if(Icebolt_Timer < diff && Icebolt_Count < 5) { - Unit* target = NULL; - - target = SelectUnit(SELECT_TARGET_RANDOM,0); - - DoCast(target,SPELL_ICEBOLT); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_ICEBOLT); Icebolt_Count ++; Icebolt_Timer = 4000; }else Icebolt_Timer -= diff; @@ -138,7 +133,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI { if(FrostBreath_Timer < diff ) { - DoTextEmote("takes a deep breath...",NULL); + DoScriptText(EMOTE_BREATH, m_creature); DoCast(m_creature->getVictim(),SPELL_FROST_BREATH); land_Timer = 2000; landoff = true; @@ -161,26 +156,18 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI } - if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 11) + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 10) { if (Beserk_Timer < diff) { - DoTextEmote("enrages!",NULL); + DoScriptText(EMOTE_ENRAGE, m_creature); DoCast(m_creature,SPELL_BESERK); Beserk_Timer = 300000; }else Beserk_Timer -= diff; } - if( phase!=2 && m_creature->getVictim() && m_creature->IsWithinMeleeRange(m_creature->getVictim())) - { - if( m_creature->isAttackReady() ) - { - m_creature->AttackerStateUpdate(m_creature->getVictim()); - m_creature->resetAttackTimer(); - } - } - } - } + if (phase!=2) + DoMeleeAttackIfReady(); } }; diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_sir_zeliek.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_sir_zeliek.cpp deleted file mode 100644 index 49f4228b81a..00000000000 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_sir_zeliek.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Boss_Sir_Zeliek -SD%Complete: 100 -SDComment: -SDCategory: Naxxramas -EndScriptData */ - -#include "precompiled.h" - -//All horsemen -#define SPELL_SHIELDWALL 29061 -#define SPELL_BESERK 26662 - -// sir zeliek -#define SPELL_MARK_OF_ZELIEK 28835 -#define SPELL_HOLY_WRATH 28883 - -#define SAY_AGGRO "Flee, before it's too late!" -#define SAY_TAUNT1 "Invaders, cease this foolish venture at once! Turn away while you still can!" -#define SAY_TAUNT2 "Perhaps they will come to their senses, and run away as fast as they can!" -#define SAY_TAUNT3 "Do not continue! Turn back while there's still time!" -#define SAY_SPECIAL "I- I have no choice but to obey!" -#define SAY_SLAY "Forgive me!" -#define SAY_DEATH "It is... as it should be." - -#define SOUND_AGGRO 8913 -#define SOUND_TAUNT1 8917 -#define SOUND_TAUNT2 8918 -#define SOUND_TAUNT3 8919 -#define SOUND_SPECIAl 8916 -#define SOUND_SLAY 8915 -#define SOUND_DEATH 8914 - -struct TRINITY_DLL_DECL boss_sir_zeliekAI : public ScriptedAI -{ - boss_sir_zeliekAI(Creature *c) : ScriptedAI(c) {Reset();} - - uint32 Mark_Timer; - uint32 HolyWrath_Timer; - bool ShieldWall1; - bool ShieldWall2; - - void Reset() - { - Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. - HolyWrath_Timer = 12000; // right - ShieldWall1 = true; - ShieldWall2 = true; - } - - void InitialYell() - { - if(!InCombat) - { - DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO); - } - } - - void KilledUnit() - { - DoYell(SAY_SLAY,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY); - } - - void JustDied(Unit* Killer) - { - DoYell(SAY_DEATH,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature, SOUND_DEATH); - } - - void Aggro(Unit *who) - { - InitialYell(); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) - return; - - // Mark of Zeliek - if(Mark_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_MARK_OF_ZELIEK); - Mark_Timer = 12000; - }else Mark_Timer -= diff; - - // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds - if(ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) - { - if(ShieldWall1) - { - DoCast(m_creature,SPELL_SHIELDWALL); - ShieldWall1 = false; - } - } - if(ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) - { - if(ShieldWall2) - { - DoCast(m_creature,SPELL_SHIELDWALL); - ShieldWall2 = false; - } - } - - // Holy Wrath - if(HolyWrath_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_HOLY_WRATH); - HolyWrath_Timer = 12000; - }else HolyWrath_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_sir_zeliek(Creature *_Creature) -{ - return new boss_sir_zeliekAI (_Creature); -} - -void AddSC_boss_sir_zeliek() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_sir_zeliek"; - newscript->GetAI = &GetAI_boss_sir_zeliek; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_stalagg.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_stalagg.cpp deleted file mode 100644 index b5b2c357597..00000000000 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_stalagg.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Boss_Stalagg -SD%Complete: 0 -SDComment: Merge with Thaddius -SDCategory: Naxxramas -EndScriptData */ - -#include "precompiled.h" - -//Stalagg -//8864 aggro - Stalagg crush you! -//8866 slay - Stalagg Kill! -//8865 death - Master save me... - -#define SPELL_WARSTOMP 28125 -#define SPELL_POWERSURGE 28134 -#define SPELL_CHAIN_LIGHTNING 28900 - -//Not sure how to "force" crushing blows or to knock tank to the opposite platform diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp index 60b32700cb0..dcf044697c3 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp @@ -23,18 +23,35 @@ EndScriptData */ #include "precompiled.h" +//Stalagg +#define SAY_STAL_AGGRO -1533023 +#define SAY_STAL_SLAY -1533024 +#define SAY_STAL_DEATH -1533025 + +#define SPELL_POWERSURGE 28134 + +//Feugen +#define SAY_FEUG_AGGRO -1533026 +#define SAY_FEUG_SLAY -1533027 +#define SAY_FEUG_DEATH -1533028 + +#define SPELL_MANABURN 28135 + +//both +#define SPELL_WARSTOMP 28125 + //Thaddus -//8873 Lamnt01 - Pleeease! -//8874 Lamnt02 - Stop, make it stop! -//8875 Lamnt03 - Help me! Save me! -//8876 Lamnt04 - Please, nooo! -//8872 greet - You are too late... I... must... OBEY! -//8867 aggro1 - KILL! -//8868 aggro2 - EAT YOUR BONES! -//8869 aggro3 - BREAK YOU! -//8871 elect - Now YOU feel pain! -//8877 slay - You die now! -//8870 die - Thank... you... +#define SAY_GREET -1533029 +#define SAY_AGGRO1 -1533030 +#define SAY_AGGRO2 -1533031 +#define SAY_AGGRO3 -1533032 +#define SAY_SLAY -1533033 +#define SAY_ELECT -1533034 +#define SAY_DEATH -1533035 +#define SAY_SCREAM1 -1533036 +#define SAY_SCREAM2 -1533037 +#define SAY_SCREAM3 -1533038 +#define SAY_SCREAM4 -1533039 #define SPELL_BALL_LIGHTNING 28299 @@ -44,6 +61,10 @@ EndScriptData */ #define SPELL_CHARGE_NEGATIVE_DMGBUFF 29660 #define SPELL_CHARGE_NEGATIVE_NEARDMG 28084 -#define SPELL_CHAIN_LIGHTNING 28900 +#define SPELL_CHAIN_LIGHTNING 28167 +#define H_SPELL_CHAIN_LIGHTNING 54531 #define SPELL_BESERK 26662 + + //generic +#define C_TESLA_COIL 16218 //the coils (emotes "Tesla Coil overloads!")
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_thane_korthazz.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_thane_korthazz.cpp deleted file mode 100644 index bea74071bcb..00000000000 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_thane_korthazz.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Boss_Thane_Korthazz -SD%Complete: 100 -SDComment: -SDCategory: Naxxramas -EndScriptData */ - -#include "precompiled.h" - -//All horsemen -#define SPELL_SHIELDWALL 29061 -#define SPELL_BESERK 26662 - -// thane korthazz -#define SPELL_MARK_OF_KORTHAZZ 28832 -#define SPELL_METEOR 26558 // m_creature->getVictim() auto-area spell but with a core problem - -#define SAY_AGGRO "Come out and fight, ye wee ninny!" -#define SAY_TAUNT1 "To arms, ye roustabouts! We've got company!" -#define SAY_TAUNT2 "I heard about enough of yer sniveling. Shut yer fly trap 'afore I shut it for ye!" -#define SAY_TAUNT3 "I'm gonna enjoy killin' these slack-jawed daffodils!" -#define SAY_SLAY "Next time, bring more friends!" -#define SAY_SPECIAl "I like my meat extra crispy!" -#define SAY_DEATH "What a bloody waste this is!" - -#define SOUND_AGGRO 8899 -#define SOUND_TAUNT1 8903 -#define SOUND_TAUNT2 8904 -#define SOUND_TAUNT3 8905 -#define SOUND_SLAY 8901 -#define SOUND_SPECIAL 8902 -#define SOUND_DEATH 8900 - -#define SPIRIT_OF_KORTHAZZ 16778 - -struct TRINITY_DLL_DECL boss_thane_korthazzAI : public ScriptedAI -{ - boss_thane_korthazzAI(Creature *c) : ScriptedAI(c) {Reset();} - - uint32 Mark_Timer; - uint32 Meteor_Timer; - bool ShieldWall1; - bool ShieldWall2; - - void Reset() - { - Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. - Meteor_Timer = 30000; // wrong - ShieldWall1 = true; - ShieldWall2 = true; - } - - void InitialYell() - { - if(!InCombat) - { - DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO); - } - } - - void KilledUnit() - { - DoYell(SAY_SLAY,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY); - } - - void JustDied(Unit* Killer) - { - DoYell(SAY_DEATH,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature, SOUND_DEATH); - } - - void Aggro(Unit *who) - { - InitialYell(); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) - return; - - // Mark of Korthazz - if(Mark_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_MARK_OF_KORTHAZZ); - Mark_Timer = 12000; - }else Mark_Timer -= diff; - - // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds - if(ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) - { - if(ShieldWall1) - { - DoCast(m_creature,SPELL_SHIELDWALL); - ShieldWall1 = false; - } - } - if(ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) - { - if(ShieldWall2) - { - DoCast(m_creature,SPELL_SHIELDWALL); - ShieldWall2 = false; - } - } - - // Meteor - if(Meteor_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_METEOR); - Meteor_Timer = 20000; // wrong - }else Meteor_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_thane_korthazz(Creature *_Creature) -{ - return new boss_thane_korthazzAI (_Creature); -} - -void AddSC_boss_thane_korthazz() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_thane_korthazz"; - newscript->GetAI = &GetAI_boss_thane_korthazz; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp b/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp index c5297963c71..90f680cf82a 100644 --- a/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp +++ b/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp @@ -130,20 +130,20 @@ CreatureAI* GetAI_mob_aquementas(Creature *_Creature) ## npc_custodian_of_time ######*/ -#define WHISPER_CUSTODIAN_1 "Greetings, $N. I will guide you through the cavern. Please try and keep up." -#define WHISPER_CUSTODIAN_2 "We do not know if the Caverns of Time have always been accessible to mortals. Truly, it is impossible to tell as the Timeless One is in perpetual motion, changing our timeways as he sees fit. What you see now may very well not exist tomorrow. You may wake up and have no memory of this place." -#define WHISPER_CUSTODIAN_3 "It is strange, I know... Most mortals cannot actually comprehend what they see here, as often, what they see is not anchored within their own perception of reality." -#define WHISPER_CUSTODIAN_4 "Follow me, please." -#define WHISPER_CUSTODIAN_5 "There are only two truths to be found here: First, that time is chaotic, always in flux, and completely malleable and second, perception does not dictate reality." -#define WHISPER_CUSTODIAN_6 "As custodians of time, we watch over and care for Nozdormu's realm. The master is away at the moment, which means that attempts are being made to dramatically alter time. The master never meddles in the affairs of mortals but instead corrects the alterations made to time by others. He is reactionary in this regard." -#define WHISPER_CUSTODIAN_7 "For normal maintenance of time, the Keepers of Time are sufficient caretakers. We are able to deal with most ordinary disturbances. I speak of little things, such as rogue mages changing something in the past to elevate their status or wealth in the present." -#define WHISPER_CUSTODIAN_8 "These tunnels that you see are called timeways. They are infinite in number. The ones that currently exist in your reality are what the master has deemed as 'trouble spots.' These trouble spots may differ completely in theme but they always share a cause. That is, their existence is a result of the same temporal disturbance. Remember that should you venture inside one..." -#define WHISPER_CUSTODIAN_9 "This timeway is in great disarray! We have agents inside right now attempting to restore order. What information I have indicates that Thrall's freedom is in jeopardy. A malevolent organization known as the Infinite Dragonflight is trying to prevent his escape. I fear without outside assistance, all will be lost." -#define WHISPER_CUSTODIAN_10 "We have very little information on this timeway. Sa'at has been dispatched and is currently inside. The data we have gathered from his correspondence is that the Infinite Dragonflight are once again attempting to alter time. Could it be that the opening of the Dark Portal is being targeted for sabotage? Let us hope not..." -#define WHISPER_CUSTODIAN_11 "This timeway is currently collapsing. What that may hold for the past, present and future is currently unknown..." -#define WHISPER_CUSTODIAN_12 "The timeways are currently ranked in order from least catastrophic to most catastrophic. Note that they are all classified as catastrophic, meaning that any single one of these timeways collapsing would mean that your world would end. We only classify them in such a way so that the heroes and adventurers that are sent here know which timeway best suits their abilities." -#define WHISPER_CUSTODIAN_13 "All we know of this timeway is that it leads to Mount Hyjal. The Infinite Dragonflight have gone to great lengths to prevent our involvement. We know next to nothing, mortal. Soridormi is currently attempting to break through the timeway's defenses but has thus far been unsuccessful. You might be our only hope of breaking through and resolving the conflict." -#define WHISPER_CUSTODIAN_14 "Our time is at an end $N. I would wish you luck, if such a thing existed." +#define WHISPER_CUSTODIAN_1 -1000150 +#define WHISPER_CUSTODIAN_2 -1000151 +#define WHISPER_CUSTODIAN_3 -1000152 +#define WHISPER_CUSTODIAN_4 -1000153 +#define WHISPER_CUSTODIAN_5 -1000154 +#define WHISPER_CUSTODIAN_6 -1000155 +#define WHISPER_CUSTODIAN_7 -1000156 +#define WHISPER_CUSTODIAN_8 -1000157 +#define WHISPER_CUSTODIAN_9 -1000158 +#define WHISPER_CUSTODIAN_10 -1000159 +#define WHISPER_CUSTODIAN_11 -1000160 +#define WHISPER_CUSTODIAN_12 -1000161 +#define WHISPER_CUSTODIAN_13 -1000162 +#define WHISPER_CUSTODIAN_14 -1000163 struct TRINITY_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI { @@ -157,25 +157,25 @@ struct TRINITY_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI switch( i ) { - case 0: DoWhisper(WHISPER_CUSTODIAN_1, pTemp); break; - case 1: DoWhisper(WHISPER_CUSTODIAN_2, pTemp); break; - case 2: DoWhisper(WHISPER_CUSTODIAN_3, pTemp); break; - case 3: DoWhisper(WHISPER_CUSTODIAN_4, pTemp); break; - case 5: DoWhisper(WHISPER_CUSTODIAN_5, pTemp); break; - case 6: DoWhisper(WHISPER_CUSTODIAN_6, pTemp); break; - case 7: DoWhisper(WHISPER_CUSTODIAN_7, pTemp); break; - case 8: DoWhisper(WHISPER_CUSTODIAN_8, pTemp); break; - case 9: DoWhisper(WHISPER_CUSTODIAN_9, pTemp); break; - case 10: DoWhisper(WHISPER_CUSTODIAN_4, pTemp); break; - case 13: DoWhisper(WHISPER_CUSTODIAN_10, pTemp); break; - case 14: DoWhisper(WHISPER_CUSTODIAN_4, pTemp); break; - case 16: DoWhisper(WHISPER_CUSTODIAN_11, pTemp); break; - case 17: DoWhisper(WHISPER_CUSTODIAN_12, pTemp); break; - case 18: DoWhisper(WHISPER_CUSTODIAN_4, pTemp); break; - case 22: DoWhisper(WHISPER_CUSTODIAN_13, pTemp); break; - case 23: DoWhisper(WHISPER_CUSTODIAN_4, pTemp); break; - case 24: - DoWhisper(WHISPER_CUSTODIAN_14, pTemp); + case 2: DoScriptText(WHISPER_CUSTODIAN_1, m_creature, pTemp); break; + case 3: DoScriptText(WHISPER_CUSTODIAN_2, m_creature, pTemp); break; + case 4: DoScriptText(WHISPER_CUSTODIAN_3, m_creature, pTemp); break; + case 5: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pTemp); break; + case 7: DoScriptText(WHISPER_CUSTODIAN_5, m_creature, pTemp); break; + case 8: DoScriptText(WHISPER_CUSTODIAN_6, m_creature, pTemp); break; + case 9: DoScriptText(WHISPER_CUSTODIAN_7, m_creature, pTemp); break; + case 10: DoScriptText(WHISPER_CUSTODIAN_8, m_creature, pTemp); break; + case 11: DoScriptText(WHISPER_CUSTODIAN_9, m_creature, pTemp); break; + case 12: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pTemp); break; + case 15: DoScriptText(WHISPER_CUSTODIAN_10, m_creature, pTemp); break; + case 16: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pTemp); break; + case 18: DoScriptText(WHISPER_CUSTODIAN_11, m_creature, pTemp); break; + case 19: DoScriptText(WHISPER_CUSTODIAN_12, m_creature, pTemp); break; + case 20: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pTemp); break; + case 24: DoScriptText(WHISPER_CUSTODIAN_13, m_creature, pTemp); break; + case 25: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pTemp); break; + case 26: + DoScriptText(WHISPER_CUSTODIAN_14, m_creature, pTemp); DoCast(pTemp,34883); //below here is temporary workaround, to be removed when spell works properly ((Player*)pTemp)->AreaExploredOrEventHappens(10277); @@ -214,32 +214,34 @@ CreatureAI* GetAI_npc_custodian_of_time(Creature *_Creature) { npc_custodian_of_timeAI* custodian_of_timeAI = new npc_custodian_of_timeAI(_Creature); - custodian_of_timeAI->AddWaypoint(0, -8374.93,-4250.21, -204.38,5000); - custodian_of_timeAI->AddWaypoint(1, -8374.93,-4250.21, -204.38,16000); - custodian_of_timeAI->AddWaypoint(2, -8374.93,-4250.21, -204.38,10000); - custodian_of_timeAI->AddWaypoint(3, -8374.93,-4250.21, -204.38,2000); - custodian_of_timeAI->AddWaypoint(4, -8439.40,-4180.05, -209.25); - custodian_of_timeAI->AddWaypoint(5, -8437.82,-4120.84, -208.59,10000); - custodian_of_timeAI->AddWaypoint(6, -8437.82,-4120.84, -208.59,16000); - custodian_of_timeAI->AddWaypoint(7, -8437.82,-4120.84, -208.59,13000); - custodian_of_timeAI->AddWaypoint(8, -8437.82,-4120.84, -208.59,18000); - custodian_of_timeAI->AddWaypoint(9, -8437.82,-4120.84, -208.59,15000); - custodian_of_timeAI->AddWaypoint(10, -8437.82,-4120.84, -208.59,2000); - custodian_of_timeAI->AddWaypoint(11, -8467.26,-4198.63, -214.21); - custodian_of_timeAI->AddWaypoint(12, -8667.76,-4252.13, -209.56); - custodian_of_timeAI->AddWaypoint(13, -8703.71,-4234.58, -209.5,14000); - custodian_of_timeAI->AddWaypoint(14, -8703.71,-4234.58, -209.5,2000); - custodian_of_timeAI->AddWaypoint(15, -8642.81,-4304.37, -209.57); - custodian_of_timeAI->AddWaypoint(16, -8649.06,-4394.36, -208.46,6000); - custodian_of_timeAI->AddWaypoint(17, -8649.06,-4394.36, -208.46,18000); - custodian_of_timeAI->AddWaypoint(18, -8649.06,-4394.36, -208.46,2000); - custodian_of_timeAI->AddWaypoint(19, -8468.72,-4437.67, -215.45); - custodian_of_timeAI->AddWaypoint(20, -8427.54,-4426, -211.13); - custodian_of_timeAI->AddWaypoint(21, -8364.83,-4393.32, -205.91); - custodian_of_timeAI->AddWaypoint(22, -8304.54,-4357.2, -208.2,18000); - custodian_of_timeAI->AddWaypoint(23, -8304.54,-4357.2, -208.2,2000); - custodian_of_timeAI->AddWaypoint(24, -8375.42,-4250.41, -205.14,5000); - custodian_of_timeAI->AddWaypoint(25, -8375.42,-4250.41, -205.14,5000); + custodian_of_timeAI->AddWaypoint(0, -8535.57,-4212.61, -212.04); + custodian_of_timeAI->AddWaypoint(1, -8456.48,-4211.77, -213.30); + custodian_of_timeAI->AddWaypoint(2, -8374.93,-4250.21, -205.05,5000); + custodian_of_timeAI->AddWaypoint(3, -8374.93,-4250.21, -204.38,16000); + custodian_of_timeAI->AddWaypoint(4, -8374.93,-4250.21, -204.38,10000); + custodian_of_timeAI->AddWaypoint(5, -8374.93,-4250.21, -204.38,2000); + custodian_of_timeAI->AddWaypoint(6, -8439.40,-4180.05, -209.25); + custodian_of_timeAI->AddWaypoint(7, -8437.82,-4120.84, -208.59,10000); + custodian_of_timeAI->AddWaypoint(8, -8437.82,-4120.84, -208.59,16000); + custodian_of_timeAI->AddWaypoint(9, -8437.82,-4120.84, -208.59,13000); + custodian_of_timeAI->AddWaypoint(10, -8437.82,-4120.84, -208.59,18000); + custodian_of_timeAI->AddWaypoint(11, -8437.82,-4120.84, -208.59,15000); + custodian_of_timeAI->AddWaypoint(12, -8437.82,-4120.84, -208.59,2000); + custodian_of_timeAI->AddWaypoint(13, -8467.26,-4198.63, -214.21); + custodian_of_timeAI->AddWaypoint(14, -8667.76,-4252.13, -209.56); + custodian_of_timeAI->AddWaypoint(15, -8703.71,-4234.58, -209.5,14000); + custodian_of_timeAI->AddWaypoint(16, -8703.71,-4234.58, -209.5,2000); + custodian_of_timeAI->AddWaypoint(17, -8642.81,-4304.37, -209.57); + custodian_of_timeAI->AddWaypoint(18, -8649.06,-4394.36, -208.46,6000); + custodian_of_timeAI->AddWaypoint(19, -8649.06,-4394.36, -208.46,18000); + custodian_of_timeAI->AddWaypoint(20, -8649.06,-4394.36, -208.46,2000); + custodian_of_timeAI->AddWaypoint(21, -8468.72,-4437.67, -215.45); + custodian_of_timeAI->AddWaypoint(22, -8427.54,-4426, -211.13); + custodian_of_timeAI->AddWaypoint(23, -8364.83,-4393.32, -205.91); + custodian_of_timeAI->AddWaypoint(24, -8304.54,-4357.2, -208.2,18000); + custodian_of_timeAI->AddWaypoint(25, -8304.54,-4357.2, -208.2,2000); + custodian_of_timeAI->AddWaypoint(26, -8375.42,-4250.41, -205.14,5000); + custodian_of_timeAI->AddWaypoint(27, -8375.42,-4250.41, -205.14,5000); return (CreatureAI*)custodian_of_timeAI; } diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index 5dd863493a8..b00bd33bd24 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -595,6 +595,19 @@ namespace Trinity Unit const* i_funit; float i_range; }; + + class CreatureWithDbGUIDCheck + { + public: + CreatureWithDbGUIDCheck(WorldObject const* obj, uint32 lowguid) : i_obj(obj), i_lowguid(lowguid) {} + bool operator()(Creature* u) + { + return u->GetDBTableGUIDLow() == i_lowguid; + } + private: + WorldObject const* i_obj; + uint32 i_lowguid; + }; class AnyFriendlyUnitInObjectRangeCheck { diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index 4a34f51d672..9271c14ed13 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -777,8 +777,7 @@ LootStoreItem const * LootTemplate::LootGroup::Roll() const return &ExplicitlyChanced[i]; ItemPrototype const *pProto = objmgr.GetItemPrototype(ExplicitlyChanced[i].itemid); - float qualityMultiplier = pProto ? sWorld.getRate(qualityToRate[pProto->Quality]) : 1.0f; - Roll -= ExplicitlyChanced[i].chance * qualityMultiplier; + Roll -= ExplicitlyChanced[i].chance; if (Roll < 0) return &ExplicitlyChanced[i]; } diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 594cfaf0877..8d14db9e377 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -7541,3 +7541,39 @@ ObjectMgr::ScriptNameMap & GetScriptNames() { return objmgr.GetScriptNames(); } + +void ObjectMgr::LoadTransportEvents() +{ + + QueryResult *result = WorldDatabase.Query("SELECT entry, waypoint_id, event_id FROM transport_events"); + + if( !result ) + { + barGoLink bar1( 1 ); + bar1.step(); + sLog.outString( "\n>> Transport events table is empty \n" ); + return; + } + + barGoLink bar1( result->GetRowCount() ); + + do + { + bar1.step(); + + Field *fields = result->Fetch(); + + //Load event values + uint32 entry = fields[0].GetUInt32(); + uint32 waypoint_id = fields[1].GetUInt32(); + uint32 event_id = fields[2].GetUInt32(); + + uint32 event_count = (entry*100)+waypoint_id; + TransportEventMap[event_count] = event_id; + } + while(result->NextRow()); + + sLog.outString( "\n>> Loaded %u transport events \n", result->GetRowCount() ); + + delete result; +}
\ No newline at end of file diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index 4a35f98b679..cca03ae39a3 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -321,7 +321,9 @@ class ObjectMgr typedef std::vector<std::string> ScriptNameMap; - Player* GetPlayer(const char* name) const { return ObjectAccessor::Instance().FindPlayerByName(name);} + UNORDERED_MAP<uint32, uint32> TransportEventMap; + + Player* GetPlayer(const char* name) const { return ObjectAccessor::Instance().FindPlayerByName(name);} Player* GetPlayer(uint64 guid) const { return ObjectAccessor::FindPlayer(guid); } static GameObjectInfo const *GetGameObjectInfo(uint32 id) { return sGOStorage.LookupEntry<GameObjectInfo>(id); } @@ -533,6 +535,8 @@ class ObjectMgr void LoadEventScripts(); void LoadSpellScripts(); void LoadWaypointScripts(); + + void LoadTransportEvents(); bool LoadTrinityStrings(DatabaseType& db, char const* table, int32 min_value, int32 max_value); bool LoadTrinityStrings() { return LoadTrinityStrings(WorldDatabase,"trinity_string",MIN_TRINITY_STRING_ID,MAX_TRINITY_STRING_ID); } @@ -588,7 +592,7 @@ class ObjectMgr void LoadNpcTextId(); void LoadVendors(); void LoadTrainerSpell(); - + std::string GeneratePetName(uint32 entry); uint32 GetBaseXP(uint32 level); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 6865c67d24c..06fff3309c0 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5777,6 +5777,13 @@ void Aura::PeriodicTick() int32 gain = pCaster->ModifyPower(power,gain_amount); m_target->AddThreat(pCaster, float(gain) * 0.5f, GetSpellSchoolMask(GetSpellProto()), GetSpellProto()); } + // Mark of Kaz'rogal + if(GetId() == 31447 && m_target->GetPower(power) == 0) + { + m_target->CastSpell(m_target, 31463, true, 0, this); + // Remove aura + SetAuraDuration(0); + } break; } case SPELL_AURA_PERIODIC_ENERGIZE: diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 19495a4ba25..494921eb2a5 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2157,6 +2157,8 @@ void SpellMgr::LoadSpellCustomAttr() case 29576: //Multi-Shot case 40816: //Saber Lash case 37790: //Spread Shot + case 46771: //Flame Sear + case 45248: //Shadow Blades spellInfo->MaxAffectedTargets = 3; break; case 38310: //Multi-Shot @@ -2165,6 +2167,7 @@ void SpellMgr::LoadSpellCustomAttr() case 42005: // Bloodboil case 38296: //Spitfire Totem case 37676: //Insidious Whisper + case 46009: //Negative Energy spellInfo->MaxAffectedTargets = 5; break; case 40827: //Sinful Beam diff --git a/src/game/Transports.cpp b/src/game/Transports.cpp index 21d3d3b1f27..cccf50ad0fb 100644 --- a/src/game/Transports.cpp +++ b/src/game/Transports.cpp @@ -29,6 +29,8 @@ #include "Database/DBCStores.h" #include "ProgressBar.h" +#include "World.h" + void MapManager::LoadTransports() { QueryResult *result = WorldDatabase.Query("SELECT entry, name, period FROM transports"); @@ -316,7 +318,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids) if (keyFrames[keyFrames.size() - 1].mapid != keyFrames[0].mapid) teleport = true; - WayPoint pos(keyFrames[0].mapid, keyFrames[0].x, keyFrames[0].y, keyFrames[0].z, teleport); + WayPoint pos(keyFrames[0].mapid, keyFrames[0].x, keyFrames[0].y, keyFrames[0].z, teleport, 0); m_WayPoints[0] = pos; t += keyFrames[0].delay * 1000; @@ -350,7 +352,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids) } // sLog.outString("T: %d, D: %f, x: %f, y: %f, z: %f", t, d, newX, newY, newZ); - WayPoint pos(keyFrames[i].mapid, newX, newY, newZ, teleport); + WayPoint pos(keyFrames[i].mapid, newX, newY, newZ, teleport, i); if (teleport) m_WayPoints[t] = pos; } @@ -396,13 +398,13 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids) cM = keyFrames[i + 1].mapid; } - WayPoint pos(keyFrames[i + 1].mapid, keyFrames[i + 1].x, keyFrames[i + 1].y, keyFrames[i + 1].z, teleport); + WayPoint pos(keyFrames[i + 1].mapid, keyFrames[i + 1].x, keyFrames[i + 1].y, keyFrames[i + 1].z, teleport, i); // sLog.outString("T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport); - +/* if(keyFrames[i+1].delay > 5) pos.delayed = true; - +*/ //if (teleport) m_WayPoints[t] = pos; @@ -485,6 +487,13 @@ bool Transport::RemovePassenger(Player* passenger) return true; } +void Transport::CheckForEvent(uint32 entry, uint32 wp_id) +{ + uint32 key = entry*100+wp_id; + if(objmgr.TransportEventMap.find(key) != objmgr.TransportEventMap.end()) + sWorld.ScriptsStart(sEventScripts, objmgr.TransportEventMap[key], this, NULL); +} + void Transport::Update(uint32 /*p_time*/) { if (m_WayPoints.size() <= 1) @@ -506,7 +515,7 @@ void Transport::Update(uint32 /*p_time*/) //MapManager::Instance().GetMap(m_curr->second.mapid)->GameobjectRelocation((GameObject *)this, m_curr->second.x, m_curr->second.y, m_curr->second.z, this->m_orientation); Relocate(m_curr->second.x, m_curr->second.y, m_curr->second.z); } - +/* if(m_curr->second.delayed) { switch (GetEntry()) @@ -526,7 +535,7 @@ void Transport::Update(uint32 /*p_time*/) SendPlaySound(5154, false); break; // ShipDocked } } - +*/ /* for(PlayerSet::iterator itr = m_passengers.begin(); itr != m_passengers.end();) { @@ -547,5 +556,9 @@ void Transport::Update(uint32 /*p_time*/) if ((sLog.getLogFilter() & LOG_FILTER_TRANSPORT_MOVES)==0) sLog.outDetail("%s moved to %f %f %f %d", this->m_name.c_str(), m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid); - } + + //Transport Event System + CheckForEvent(this->GetEntry(), m_curr->second.id); + sLog.outDetail("%s is at wp id: %u", this->m_name.c_str(), m_curr->second.id); + } } diff --git a/src/game/Transports.h b/src/game/Transports.h index 0e39d57c089..5fb15dbe98f 100644 --- a/src/game/Transports.h +++ b/src/game/Transports.h @@ -78,6 +78,7 @@ class Transport : private GameObject void Update(uint32 p_time); bool AddPassenger(Player* passenger); bool RemovePassenger(Player* passenger); + void CheckForEvent(uint32 entry, uint32 wp_id); typedef std::set<Player*> PlayerSet; PlayerSet const& GetPassengers() const { return m_passengers; } @@ -86,15 +87,15 @@ class Transport : private GameObject private: struct WayPoint { - WayPoint() : mapid(0), x(0), y(0), z(0), teleport(false) {} - WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport) : - mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport), delayed(false) {} + WayPoint() : mapid(0), x(0), y(0), z(0), teleport(false), id(0) {} + WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport, uint32 _id) : + mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport), id(_id) {} uint32 mapid; float x; float y; float z; bool teleport; - bool delayed; + uint32 id; }; typedef std::map<uint32, WayPoint> WayPointMap; diff --git a/src/game/World.cpp b/src/game/World.cpp index 2f331c73893..d525945bd20 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -63,6 +63,7 @@ #include "Util.h" #include "Language.h" #include "CreatureGroups.h" +#include "Transports.h" INSTANTIATE_SINGLETON_1( World ); @@ -1356,6 +1357,9 @@ void World::SetInitialWorldSettings() //Not sure if this can be moved up in the sequence (with static data loading) as it uses MapManager sLog.outString( "Loading Transports..." ); MapManager::Instance().LoadTransports(); + + sLog.outString( "Loading Transports Events..." ); + objmgr.LoadTransportEvents(); sLog.outString("Deleting expired bans..." ); loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); @@ -1614,7 +1618,7 @@ void World::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, return; // prepare static data - uint64 sourceGUID = source->GetGUID(); + uint64 sourceGUID = source ? source->GetGUID() : (uint64)0; //some script commands doesn't have source uint64 targetGUID = target ? target->GetGUID() : (uint64)0; uint64 ownerGUID = (source->GetTypeId()==TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : (uint64)0; @@ -1643,7 +1647,7 @@ void World::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* s // NOTE: script record _must_ exist until command executed // prepare static data - uint64 sourceGUID = source->GetGUID(); + uint64 sourceGUID = source ? source->GetGUID() : (uint64)0; uint64 targetGUID = target ? target->GetGUID() : (uint64)0; uint64 ownerGUID = (source->GetTypeId()==TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : (uint64)0; @@ -1697,12 +1701,22 @@ void World::ScriptsProcess() source = HashMapHolder<Player>::Find(step.sourceGUID); break; case HIGHGUID_GAMEOBJECT: - source = HashMapHolder<GameObject>::Find(step.sourceGUID); + source = HashMapHolder<GameObject>::Find(step.sourceGUID); break; case HIGHGUID_CORPSE: source = HashMapHolder<Corpse>::Find(step.sourceGUID); break; - default: + case HIGHGUID_MO_TRANSPORT: + for (MapManager::TransportSet::iterator iter = MapManager::Instance().m_Transports.begin(); iter != MapManager::Instance().m_Transports.end(); ++iter) + { + if((*iter)->GetGUID() == step.sourceGUID) + { + source = reinterpret_cast<Object*>(*iter); + break; + } + } + break; + default: sLog.outError("*_script source with unsupported high guid value %u",GUID_HIPART(step.sourceGUID)); break; } @@ -2268,6 +2282,80 @@ void World::ScriptsProcess() break; } + case SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT: + { + if(!step.script->datalong || !step.script->datalong2) + { + sLog.outError("SCRIPT_COMMAND_CALLSCRIPT calls invallid db_script_id or lowguid not present: skipping."); + break; + } + Creature* target = NULL; + + if(source) //using grid searcher + { + CellPair p(Trinity::ComputeCellPair(((Unit*)source)->GetPositionX(), ((Unit*)source)->GetPositionY())); + Cell cell(p); + cell.data.Part.reserved = ALL_DISTRICT; + + //sLog.outDebug("Attempting to find Creature: Db GUID: %i", step.script->datalong); + Trinity::CreatureWithDbGUIDCheck target_check(((Unit*)source), step.script->datalong); + Trinity::CreatureSearcher<Trinity::CreatureWithDbGUIDCheck> checker(target,target_check); + + TypeContainerVisitor<Trinity::CreatureSearcher <Trinity::CreatureWithDbGUIDCheck>, GridTypeMapContainer > unit_checker(checker); + CellLock<GridReadGuard> cell_lock(cell, p); + cell_lock->Visit(cell_lock, unit_checker, *(((Unit*)source)->GetMap())); + } + else //check hashmap holders + { + if(CreatureData const* data = objmgr.GetCreatureData(step.script->datalong)) + target = ObjectAccessor::GetObjectInWorld<Creature>(data->mapid, data->posX, data->posY, MAKE_NEW_GUID(step.script->datalong, data->id, HIGHGUID_UNIT), target); + } + + if(!target) + break; + + //Lets choose our ScriptMap map + ScriptMapMap datamap; + switch(step.script->dataint) + { + case 1: + datamap = sQuestEndScripts; + break; + case 2: + datamap = sQuestStartScripts; + break; + case 3: + datamap = sSpellScripts; + break; + case 4: + datamap = sGameObjectScripts; + break; + case 5: + datamap = sEventScripts; + break; + case 6: + datamap = sWaypointScripts; + break; + default: + sLog.outError("SCRIPT_COMMAND_CALLSCRIPT ERROR: no scriptmap present... ignoring"); + m_scriptSchedule.erase(iter); + return; + } + uint32 script_id = step.script->datalong2; + m_scriptSchedule.erase(iter); + ScriptsStart(datamap, script_id, target, NULL); + return; + } + + case SCRIPT_COMMAND_PLAYSOUND: + { + if(!source) + break; + //datalong sound_id, datalong2 onlyself + ((WorldObject*)source)->SendPlaySound(step.script->datalong, step.script->datalong2); + break; + } + default: sLog.outError("Unknown script command %u called.",step.script->command); break; diff --git a/src/game/World.h b/src/game/World.h index c31e05d5a3b..aca311335df 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -326,6 +326,9 @@ enum RealmZone #define SCRIPT_COMMAND_REMOVE_AURA 14 // source (datalong2!=0) or target (datalong==0) unit, datalong = spell_id #define SCRIPT_COMMAND_CAST_SPELL 15 // source (datalong2!=0) or target (datalong==0) unit, datalong = spell_id #define SCRIPT_COMMAND_LOAD_PATH 16 // source = unit, path = datalong, repeatable datalong2 +#define SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT 17 // datalong scriptid, lowguid datalong2, dataint table +#define SCRIPT_COMMAND_PLAYSOUND 18 // datalong soundid, datalong2 play only self + /// Storage class for commands issued for delayed execution struct CliCommandHolder |